From 9aa11269a56828f6c2f43cd664dec278509e52c2 Mon Sep 17 00:00:00 2001 From: easong-openai Date: Thu, 31 Jul 2025 12:41:32 -0700 Subject: [PATCH] Fix double-scrolling in approval model (#1754) Previously, pressing up or down arrow in the new approval modal would be the equivalent of two up or down presses. --- codex-rs/tui/src/app.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/codex-rs/tui/src/app.rs b/codex-rs/tui/src/app.rs index 44c1875d..3013cb6d 100644 --- a/codex-rs/tui/src/app.rs +++ b/codex-rs/tui/src/app.rs @@ -96,7 +96,9 @@ impl App<'_> { if let Ok(event) = crossterm::event::read() { match event { crossterm::event::Event::Key(key_event) => { - app_event_tx.send(AppEvent::KeyEvent(key_event)); + if key_event.kind == crossterm::event::KeyEventKind::Press { + app_event_tx.send(AppEvent::KeyEvent(key_event)); + } } crossterm::event::Event::Resize(_, _) => { app_event_tx.send(AppEvent::RequestRedraw);