ctrl+arrows also move words (#1949)

this was removed at some point, but this is a common keybind for word
left/right.
This commit is contained in:
Jeremy Rose
2025-08-07 14:27:44 -04:00
committed by GitHub
parent e07776ccc9
commit c787603812

View File

@@ -300,14 +300,14 @@ impl TextArea {
// Option/Right -> Alt+Right (next word end) // Option/Right -> Alt+Right (next word end)
KeyEvent { KeyEvent {
code: KeyCode::Left, code: KeyCode::Left,
modifiers: KeyModifiers::ALT, modifiers: KeyModifiers::ALT | KeyModifiers::CONTROL,
.. ..
} => { } => {
self.set_cursor(self.beginning_of_previous_word()); self.set_cursor(self.beginning_of_previous_word());
} }
KeyEvent { KeyEvent {
code: KeyCode::Right, code: KeyCode::Right,
modifiers: KeyModifiers::ALT, modifiers: KeyModifiers::ALT | KeyModifiers::CONTROL,
.. ..
} => { } => {
self.set_cursor(self.end_of_next_word()); self.set_cursor(self.end_of_next_word());