-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
custom <Esc> key binding "jj" stoped working when entering insert mode from "cw" #3088
Comments
Thanks for the report! I was able to reproduce, and I will take a look. This is a regression from #3081, which enabled black hole remappings by preventing use of remappings after an operator is pressed. That logic seems like it would work, except in this case the whole "ciwjj" is considered one key combination (which makes sense, as Vim would count it as one combination on e.g. undo), and therefore it sees an operator (the I believe what is needed is to ensure post-operator keys don't remap only in Normal mode. I will create some unit tests for the scenarios you mention, and put up a fix PR. |
Bug fix PR is up. Remappings should work in this case if an operator combination results in leaving normal mode. I added a test as well to make sure we don't have future regressions. |
As a temporary workaround in the meantime, you can downgrade this extension to the previous version:
|
@sarink When a new version is available how can I update from this custom version? |
Also curious about how to update. I'm noticing that this custom remap breaks in a few different instances, not just |
An update is planned for tonight I heard. I'm not sure about if you install a custom version, you might have to uninstall it and reinstall from searching in the store after the update is released. |
To re-update, simply uninstall and reinstall, it's no big deal. |
Describe the bug
Leaving insert mode with a custom key binding does not work if you entered insert mode from a "cw" command.
To Reproduce
Steps to reproduce the behavior:
map
"jj"
to<Esc>
with"i"
to enter insert mode and write some text. Press"jj"
to confirm it leaves insert mode."cw"
to change the word."jj"
"j"
and does not leave insert mode as it should.Expected behavior
When entering insert mode with
"cw"
typing"jj"
, if mapped to<Esc>
, should indeed exit insert mode considering it works fine when hitting"i"
then hitting'jj"
.Screenshots
Environment (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: