diff options
author | Nico Weber <thakis@chromium.org> | 2020-09-13 21:15:07 -0400 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-09-15 09:45:13 +0200 |
commit | d7539cf49733157c481f438f83b317745450cbd2 (patch) | |
tree | a5447411a5ab87757e3228ce812b328dae38d5d6 /Libraries/LibLine | |
parent | 83c07be794276b82833f22c0b9e8cd3a6b72a291 (diff) | |
download | serenity-d7539cf49733157c481f438f83b317745450cbd2.zip |
LibLine: Support Alt + Arrow left/right
It does the same thing as Ctrl + Arrow left/right: Wordwise movement.
Diffstat (limited to 'Libraries/LibLine')
-rw-r--r-- | Libraries/LibLine/Editor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Libraries/LibLine/Editor.cpp b/Libraries/LibLine/Editor.cpp index 7401a93882..fc80b41c7b 100644 --- a/Libraries/LibLine/Editor.cpp +++ b/Libraries/LibLine/Editor.cpp @@ -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(); |