diff options
author | Zaggy1024 <zaggy1024@gmail.com> | 2022-11-16 04:40:11 -0600 |
---|---|---|
committer | Ali Mohammad Pur <Ali.mpfard@gmail.com> | 2022-11-20 03:57:17 +0330 |
commit | 7aabda37d1bca75e15ddd2c926b87a01cd2b67f4 (patch) | |
tree | 41cd5611a4e6bab7d678703927e5dd0ce2f47b4d /Userland/Libraries/LibLine/Editor.cpp | |
parent | f7a252ae85306bf4750419e9e65a5a5e2a406772 (diff) | |
download | serenity-7aabda37d1bca75e15ddd2c926b87a01cd2b67f4.zip |
LibVT/LibLine: Delete words when pressing Ctrl+Backspace in Terminal
Diffstat (limited to 'Userland/Libraries/LibLine/Editor.cpp')
-rw-r--r-- | Userland/Libraries/LibLine/Editor.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Userland/Libraries/LibLine/Editor.cpp b/Userland/Libraries/LibLine/Editor.cpp index 5a5b61bfd6..f81945517f 100644 --- a/Userland/Libraries/LibLine/Editor.cpp +++ b/Userland/Libraries/LibLine/Editor.cpp @@ -986,6 +986,12 @@ void Editor::handle_read_event() case 'F': // ^[[F: end go_end(); continue; + case 127: + if (modifiers == CSIMod::Ctrl) + erase_alnum_word_backwards(); + else + erase_character_backwards(); + continue; case '~': if (param1 == 3) { // ^[[3~: delete if (modifiers == CSIMod::Ctrl) |