mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:17:44 +00:00
LibGUI: Add Ctrl-H to insert mode
In Vim, Ctrl-H is effectively equivalent to backspace in insert mode, as it deletes the previous character. This commit implements method delete_previous_char() to TextEditor. delete_char() already exists in EditingEngine, but it deletes the next character rather than the previous. delete_previous_char() is then called from within VimEditingEngine.
This commit is contained in:
parent
808e5e813f
commit
8230bf8944
3 changed files with 21 additions and 0 deletions
|
@ -799,6 +799,9 @@ bool VimEditingEngine::on_key_in_insert_mode(const KeyEvent& event)
|
|||
case KeyCode::Key_W:
|
||||
m_editor->delete_previous_word();
|
||||
return true;
|
||||
case KeyCode::Key_H:
|
||||
m_editor->delete_previous_char();
|
||||
return true;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue