zsh-vi-mode
zsh-vi-mode copied to clipboard
Canceling `d` or `c` with `escape` still performs an action
General information
- Alacritty 0.11.0-dev (hash d9c6c8d5)
- Manjaro Linux 5.15
-
zsh
5.9 - zvm (hash 9e909d0)
Basic examination
- [x] I have read through the README page
- [x] I have the latest version of zsh-vi-mode
- [x] I have tested with another terminal program
note: when I say "action," I mean command. I'm just saying action to disambiguate between editor commands (hjkl) and terminal commands (rm -rf).
Problem description
zvm doesn't respect pressing escape
to cancel actions that require a motion, such as d
or c
. Instead, zvm performs the action on the single character under the cursor.
It's possible this happens with other actions too, but d
and c
are the only ones I have noticed it with.
Reproduction steps
- Type something in insert mode into the prompt (ex:
echo
) - Press
escape
to enter normal mode - Type
c
- Cancel the action by pressing
escape
Notice how the character under your cursor is gone, and you have been put in insert mode. This happens with d
as well, except it doesn't put you in insert mode.
Expected behavior
Pressing escape after typing an action that requires a motion should cancel the action and not change modes.
Thanks for the great software!