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.
This commit is contained in:
Michael Bolin
2025-08-07 13:11:06 -07:00
committed by GitHub
parent c787603812
commit f74fe7af7b

View File

@@ -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());