helix
helix copied to clipboard
Extra character left when deleting words at the end of the buffer
Summary
An extra character is left untouched when deleting words from the very end of a buffer (with no new line following). Whenever I hit Ctrl-w to delete words, the last character until the cursor position is always left untouched, making it impossible to, say, delete everything before the cursor by repeating Ctrl-w.
Reproduction Steps
I tried this:
- Creating an empty file and opening it with no local config:
$ touch test.sh
$ hx -c /dev/null test.sh
-
Hit the following keys:
iabc. We're now in insert mode with the wordabd. -
Hit
Ctrl-wto delete the word.
I expected this to happen:
We should have an empty buffer now, since the word should be deleted.
Instead, this happened:
The text in the buffer becomes c.
Helix log
~/.cache/helix/helix.log
2022-10-17T10:57:55.139 helix_view::editor [ERROR] Failed to initialize the LSP for `source.bash` { cannot find binary path }
Platform
Linux
Terminal Emulator
tmux 3.3a
Helix Version
22.08.1-229-g09a6df19
Looks like range calculation is off when the cursor is at the end of the buffer.