From f74fe7af7b66714e4148fde6856bb6a7fac3eb7f Mon Sep 17 00:00:00 2001 From: Michael Bolin Date: Thu, 7 Aug 2025 13:11:06 -0700 Subject: [PATCH] fix: fix mistaken bitwise OR in #1949 (#1957) This is hard for me to test conclusively because I have the default of `ctrl left/right` used to migrate between Spaces on macOS. --- codex-rs/tui/src/bottom_pane/textarea.rs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/codex-rs/tui/src/bottom_pane/textarea.rs b/codex-rs/tui/src/bottom_pane/textarea.rs index b9908790..c45c86e5 100644 --- a/codex-rs/tui/src/bottom_pane/textarea.rs +++ b/codex-rs/tui/src/bottom_pane/textarea.rs @@ -300,14 +300,24 @@ impl TextArea { // Option/Right -> Alt+Right (next word end) KeyEvent { code: KeyCode::Left, - modifiers: KeyModifiers::ALT | KeyModifiers::CONTROL, + modifiers: KeyModifiers::ALT, + .. + } + | KeyEvent { + code: KeyCode::Left, + modifiers: KeyModifiers::CONTROL, .. } => { self.set_cursor(self.beginning_of_previous_word()); } KeyEvent { code: KeyCode::Right, - modifiers: KeyModifiers::ALT | KeyModifiers::CONTROL, + modifiers: KeyModifiers::ALT, + .. + } + | KeyEvent { + code: KeyCode::Right, + modifiers: KeyModifiers::CONTROL, .. } => { self.set_cursor(self.end_of_next_word());