Add vim-style navigation for CLI option selection (#7784)
## Summary Support "j" and "k" keys as aliases for "down" and "up" so vim users feel loved. Only support these keys when the selection is not searchable. ## Testing - env -u NO_COLOR TERM=xterm-256color cargo test -p codex-tui ------ [Codex Task](https://chatgpt.com/codex/tasks/task_i_693771b53bc8833088669060dfac2083)
This commit is contained in:
parent
05e546ee1f
commit
225a5f7ffb
1 changed files with 10 additions and 0 deletions
|
|
@ -284,6 +284,11 @@ impl BottomPaneView for ListSelectionView {
|
|||
modifiers: KeyModifiers::NONE,
|
||||
..
|
||||
} /* ^P */ => self.move_up(),
|
||||
KeyEvent {
|
||||
code: KeyCode::Char('k'),
|
||||
modifiers: KeyModifiers::NONE,
|
||||
..
|
||||
} if !self.is_searchable => self.move_up(),
|
||||
KeyEvent {
|
||||
code: KeyCode::Down,
|
||||
..
|
||||
|
|
@ -298,6 +303,11 @@ impl BottomPaneView for ListSelectionView {
|
|||
modifiers: KeyModifiers::NONE,
|
||||
..
|
||||
} /* ^N */ => self.move_down(),
|
||||
KeyEvent {
|
||||
code: KeyCode::Char('j'),
|
||||
modifiers: KeyModifiers::NONE,
|
||||
..
|
||||
} if !self.is_searchable => self.move_down(),
|
||||
KeyEvent {
|
||||
code: KeyCode::Backspace,
|
||||
..
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue