mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 03:57:15 +02:00
In Vim's insert mode, Ctrl-W deletes the word before the cursor, like Ctrl-Backspace. Unlike Ctrl-Backspace, if only whitespace exists between the end of the word and the cursor, the word will be deleted with the whitespace. To do so, this commit introduces two methods: delete_previous_word() for TextEditor and first_word_before() for TextDocument, where the former depends on the latter. delete_previous_word() is then called in VimEditingEngine.
7.7 KiB
7.7 KiB