Browse Source

LibLine: Implement ctrl-del: It does the same thing as alt-d, delete-word

Nico Weber 4 years ago
parent
commit
e1c54b8a0f
1 changed files with 4 additions and 1 deletions
  1. 4 1
      Libraries/LibLine/Editor.cpp

+ 4 - 1
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;
                 }