feat(tui): 没入でも Ctrl-O Ctrl-O で切替へズームアウトし IME 中でも届くように#424
Merged
Conversation
`Ctrl-O o` の 2 段目の `o` は IME 変換モードではローマ字変換に横取りされ usagi に届かないため、日本語 IME を ON にしたまま没入から切替へ抜けられな かった。`Ctrl-O`(0x0f)は制御文字で IME を素通しするので、二重リーダー `Ctrl-O Ctrl-O` を `Ctrl-O o` と同じ切替へのズームアウトに割り当て、IME 安 全な経路を用意する。在席は #421 で既にこの挙動なので没入もそれに揃える。 従来 `Ctrl-O Ctrl-O` が担っていたリテラル `Ctrl-O` のシェル送出(readline の operate-and-get-next 用、ほぼ未使用)は prefix 方式では使えなくなる。必要な 場合は `alt` 方式(bare Ctrl-O がシェルへ流れる)を使う旨をコメント・ドキュ メントに明記した。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
📊 Test Coverage
🎉✨ パーフェクト!全ファイル Lines カバレッジ 100% を達成しました 🏆🐰 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
目的
没入(Attached)モードで日本語 IME を ON にしたまま「切替」へ抜けられるようにする。
Ctrl-O oのリーダー文法は、2 段目のoがただの英字のため、IME 変換モードでは IME がローマ字変換(「お」)に横取りしてしまい usagi に届かない。結果として IME ON のままCtrl-O oを押しても切替に行けなかった。変更内容
classify()で、二重リーダーCtrl-O Ctrl-OをCtrl-O oと同じ 切替へのズームアウト(Reserved::Detach)に割り当て。Ctrl-O(0x0f)は制御文字なので IME を素通しし、2 打とも制御文字 → IME 安全な経路になる。document/design/05-home.md/00-tutorial.md/03-commands/02-tui.md)を実態に合わせて更新。トレードオフ
従来
Ctrl-O Ctrl-Oが担っていた「リテラルCtrl-Oをシェルへ送る」機能(readline の operate-and-get-next 用。ほぼ未使用)はprefix方式では使えなくなる。bare なCtrl-Oをシェルへ送りたい場合はalt方式(bare Ctrl-O がそのままシェルへ流れる)を使う旨を、コメントとドキュメントに明記した。テスト・確認方法
cargo fmt/cargo clippy --all-targets -- -D warnings/cargo testをパス(カバレッジ 100% 維持)。pane_input.rsの単体テストを更新(prefix_double_leader_zooms_to_switch_and_unknown_second_key_is_swallowed):Ctrl-O Ctrl-Oの両報告形式('o'+CONTROL / 生0x0f)がReserved::Detachになることを検証。focus_ctrl_o_double_leader_also_opens_switchは従来どおりパス。🤖 Generated with Claude Code