mirror of
https://github.com/openai/codex.git
synced 2026-09-14 11:57:03 +00:00
tui: let q dismiss slash help
Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
@@ -157,6 +157,11 @@ impl BottomPaneView for SlashHelpView {
|
||||
} => self.scroll_by(MAX_POPUP_ROWS as isize),
|
||||
KeyEvent {
|
||||
code: KeyCode::Esc, ..
|
||||
}
|
||||
| KeyEvent {
|
||||
code: KeyCode::Char('q'),
|
||||
modifiers: KeyModifiers::NONE,
|
||||
..
|
||||
} => {
|
||||
self.on_ctrl_c();
|
||||
}
|
||||
|
||||
@@ -6035,6 +6035,18 @@ async fn slash_help_esc_dismisses_popup() {
|
||||
assert!(!chat.bottom_pane.has_active_view());
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn slash_help_q_dismisses_popup() {
|
||||
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(None).await;
|
||||
|
||||
chat.dispatch_command(SlashCommand::Help);
|
||||
assert!(chat.bottom_pane.has_active_view());
|
||||
|
||||
chat.handle_key_event(KeyEvent::from(KeyCode::Char('q')));
|
||||
|
||||
assert!(!chat.bottom_pane.has_active_view());
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn slash_copy_state_is_preserved_during_running_task() {
|
||||
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(None).await;
|
||||
|
||||
Reference in New Issue
Block a user