mirror of
https://github.com/openai/codex.git
synced 2026-09-14 11:57:03 +00:00
tui: let shift-n go backward in slash help search
Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
@@ -375,8 +375,8 @@ impl BottomPaneView for SlashHelpView {
|
||||
..
|
||||
} => self.move_to_match(1),
|
||||
KeyEvent {
|
||||
code: KeyCode::Char('p'),
|
||||
modifiers: KeyModifiers::NONE,
|
||||
code: KeyCode::Char('p' | 'N'),
|
||||
modifiers: KeyModifiers::NONE | KeyModifiers::SHIFT,
|
||||
..
|
||||
} => self.move_to_match(-1),
|
||||
_ => {}
|
||||
|
||||
@@ -6074,6 +6074,10 @@ async fn slash_help_search_navigates_matches_with_n_and_p() {
|
||||
chat.handle_key_event(KeyEvent::from(KeyCode::Char('p')));
|
||||
let previous = render_bottom_popup(&chat, 100);
|
||||
assert!(previous.contains("2/3 |"));
|
||||
|
||||
chat.handle_key_event(KeyEvent::new(KeyCode::Char('N'), KeyModifiers::SHIFT));
|
||||
let shifted_previous = render_bottom_popup(&chat, 100);
|
||||
assert!(shifted_previous.contains("1/3 |"));
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
|
||||
Reference in New Issue
Block a user