tui: let shift-n go backward in slash help search

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Charles Cunningham
2026-03-13 04:22:02 -07:00
parent 56c7646161
commit 541bc6ef34
2 changed files with 6 additions and 2 deletions

View File

@@ -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),
_ => {}

View File

@@ -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]