1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 09:37:44 +00:00

LibLine: Support Alt + Arrow left/right

It does the same thing as Ctrl + Arrow left/right: Wordwise movement.
This commit is contained in:
Nico Weber 2020-09-13 21:15:07 -04:00 committed by Andreas Kling
parent 83c07be794
commit d7539cf497

View file

@ -717,13 +717,13 @@ void Editor::handle_read_event()
search_forwards();
continue;
case 'D': // ^[[D: arrow left
if (modifiers == CSIMod::Ctrl)
if (modifiers == CSIMod::Alt || modifiers == CSIMod::Ctrl)
cursor_left_word();
else
cursor_left_character();
continue;
case 'C': // ^[[C: arrow right
if (modifiers == CSIMod::Ctrl)
if (modifiers == CSIMod::Alt || modifiers == CSIMod::Ctrl)
cursor_right_word();
else
cursor_right_character();