From ef28639b6ee2bccedd96ac578c927f835fb5e2d2 Mon Sep 17 00:00:00 2001 From: Charles Cunningham Date: Sun, 15 Mar 2026 23:21:55 -0700 Subject: [PATCH] tui: accept plain p in help search Co-authored-by: Codex --- codex-rs/tui/src/bottom_pane/help_view.rs | 9 +++++++-- codex-rs/tui/src/chatwidget.rs | 2 +- .../codex_tui__chatwidget__tests__slash_help_output.snap | 4 ++-- ...tui__chatwidget__tests__slash_help_search_output.snap | 4 ++-- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/codex-rs/tui/src/bottom_pane/help_view.rs b/codex-rs/tui/src/bottom_pane/help_view.rs index 48b88c5c4c..79c11b1dae 100644 --- a/codex-rs/tui/src/bottom_pane/help_view.rs +++ b/codex-rs/tui/src/bottom_pane/help_view.rs @@ -389,8 +389,13 @@ impl BottomPaneView for SlashHelpView { .. } => self.move_to_match(1), KeyEvent { - code: KeyCode::Char('p' | 'N'), - modifiers: KeyModifiers::NONE | KeyModifiers::SHIFT, + code: KeyCode::Char('p'), + modifiers: KeyModifiers::NONE, + .. + } + | KeyEvent { + code: KeyCode::Char('N'), + modifiers: KeyModifiers::SHIFT, .. } => self.move_to_match(-1), _ => {} diff --git a/codex-rs/tui/src/chatwidget.rs b/codex-rs/tui/src/chatwidget.rs index 5af72da5ac..cd1cb2c2b3 100644 --- a/codex-rs/tui/src/chatwidget.rs +++ b/codex-rs/tui/src/chatwidget.rs @@ -5620,7 +5620,7 @@ impl ChatWidget { | SlashCommand::Exit | SlashCommand::Rollout | SlashCommand::Ps - | SlashCommand::Clean + | SlashCommand::Stop | SlashCommand::Clear | SlashCommand::Realtime | SlashCommand::TestApproval diff --git a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__slash_help_output.snap b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__slash_help_output.snap index 80b4e3f851..f66b233136 100644 --- a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__slash_help_output.snap +++ b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__slash_help_output.snap @@ -187,10 +187,10 @@ expression: popup Usage: /ps - /clean + /stop stop all background terminals Usage: - /clean + /stop /clear clear the terminal and start a new chat diff --git a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__slash_help_search_output.snap b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__slash_help_search_output.snap index 92c04aba5e..add94e7bc5 100644 --- a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__slash_help_search_output.snap +++ b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__slash_help_search_output.snap @@ -187,10 +187,10 @@ expression: searching Usage: /ps - /clean + /stop stop all background terminals Usage: - /clean + /stop /clear clear the terminal and start a new chat