mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-18 00:09: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:
parent
83c07be794
commit
d7539cf497
Notes:
sideshowbarker
2024-07-19 02:38:48 +09:00
Author: https://github.com/nico
Commit: d7539cf497
Pull-request: https://github.com/SerenityOS/serenity/pull/3485
Reviewed-by: https://github.com/alimpfard
1 changed files with 2 additions and 2 deletions
|
@ -717,13 +717,13 @@ void Editor::handle_read_event()
|
||||||
search_forwards();
|
search_forwards();
|
||||||
continue;
|
continue;
|
||||||
case 'D': // ^[[D: arrow left
|
case 'D': // ^[[D: arrow left
|
||||||
if (modifiers == CSIMod::Ctrl)
|
if (modifiers == CSIMod::Alt || modifiers == CSIMod::Ctrl)
|
||||||
cursor_left_word();
|
cursor_left_word();
|
||||||
else
|
else
|
||||||
cursor_left_character();
|
cursor_left_character();
|
||||||
continue;
|
continue;
|
||||||
case 'C': // ^[[C: arrow right
|
case 'C': // ^[[C: arrow right
|
||||||
if (modifiers == CSIMod::Ctrl)
|
if (modifiers == CSIMod::Alt || modifiers == CSIMod::Ctrl)
|
||||||
cursor_right_word();
|
cursor_right_word();
|
||||||
else
|
else
|
||||||
cursor_right_character();
|
cursor_right_character();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue