mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibGUI: Add Ctrl-U to insert mode
While under insert mode, Ctrl-U deletes all characters between the first non-blank character of the line and the cursor. Implement delete_from_line_start_to_cursor() in TextEditor. Then, call the method in VimEditingEngine via its pointer to an instance of TextEditor.
This commit is contained in:
parent
8230bf8944
commit
54bf6a7884
Notes:
sideshowbarker
2024-07-18 08:42:16 +09:00
Author: https://github.com/arieldon
Commit: 54bf6a7884
Pull-request: https://github.com/SerenityOS/serenity/pull/8796
Reviewed-by: https://github.com/sin-ack ✅
3 changed files with 11 additions and 0 deletions
|
@ -802,6 +802,9 @@ bool VimEditingEngine::on_key_in_insert_mode(const KeyEvent& event)
|
|||
case KeyCode::Key_H:
|
||||
m_editor->delete_previous_char();
|
||||
return true;
|
||||
case KeyCode::Key_U:
|
||||
m_editor->delete_from_line_start_to_cursor();
|
||||
return true;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue