summaryrefslogtreecommitdiff
path: root/Libraries/LibLine/Editor.cpp
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2020-09-13 21:32:22 -0400
committerAndreas Kling <kling@serenityos.org>2020-09-15 09:45:13 +0200
commite1c54b8a0f6415aadcadc69d2118e359dc0577e5 (patch)
treec44313d9792244ef9061ac672bc1f897a60fbe22 /Libraries/LibLine/Editor.cpp
parent5198eb7c1ce5f11a475a9b8c01cc76cb3d6a7fc8 (diff)
downloadserenity-e1c54b8a0f6415aadcadc69d2118e359dc0577e5.zip
LibLine: Implement ctrl-del: It does the same thing as alt-d, delete-word
Diffstat (limited to 'Libraries/LibLine/Editor.cpp')
-rw-r--r--Libraries/LibLine/Editor.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Libraries/LibLine/Editor.cpp b/Libraries/LibLine/Editor.cpp
index fc80b41c7b..a5955ba8e7 100644
--- a/Libraries/LibLine/Editor.cpp
+++ b/Libraries/LibLine/Editor.cpp
@@ -736,7 +736,10 @@ void Editor::handle_read_event()
continue;
case '~':
if (param1 == 3) { // ^[[3~: delete
- erase_character_forwards();
+ if (modifiers == CSIMod::Ctrl)
+ erase_alnum_word_forwards();
+ else
+ erase_character_forwards();
m_search_offset = 0;
continue;
}