Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

ctrl+arrows also move words (#1949)

Jeremy Rosec78760381218
diff --git a/codex-rs/tui/src/bottom_pane/textarea.rs b/codex-rs/tui/src/bottom_pane/textarea.rs
index 8e6e8b07a3..b99087904a 100644
--- a/codex-rs/tui/src/bottom_pane/textarea.rs
+++ b/codex-rs/tui/src/bottom_pane/textarea.rs
@@ -300,14 +300,14 @@ impl TextArea {
// Option/Right -> Alt+Right (next word end)
KeyEvent {
code: KeyCode::Left,
- modifiers: KeyModifiers::ALT,
+ modifiers: KeyModifiers::ALT | KeyModifiers::CONTROL,
..
} => {
self.set_cursor(self.beginning_of_previous_word());
}
KeyEvent {
code: KeyCode::Right,
- modifiers: KeyModifiers::ALT,
+ modifiers: KeyModifiers::ALT | KeyModifiers::CONTROL,
..
} => {
self.set_cursor(self.end_of_next_word());