mirror of
https://github.com/openai/codex.git
synced 2026-11-20 07:06:24 +00:00
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.
This commit is contained in:
1 parent
06c786b2da
commit
9aa11269a5
1 file changed
+3
-1
@@ -96,7 +96,9 @@ impl App<'_> {
|
|||||||
if let Ok(event) = crossterm::event::read() {
|
if let Ok(event) = crossterm::event::read() {
|
||||||
match event {
|
match event {
|
||||||
crossterm::event::Event::Key(key_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(_, _) => {
|
crossterm::event::Event::Resize(_, _) => {
|
||||||
app_event_tx.send(AppEvent::RequestRedraw);
|
app_event_tx.send(AppEvent::RequestRedraw);
|
||||||
|
|||||||
Reference in new issue
Block a user