Skip to content
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

fix(vim/#2413): Visual-in motion (viw/vi"/etc) not working correctly #2429

merged 3 commits into from Sep 11, 2020


Copy link

@bryphe bryphe commented Sep 9, 2020

Issue: Visual motions - like viw or vi" are not working as expected.

Defect: At first, I thought this might be an issue in libvim - so I added a test case in onivim/libvim#223 - surprisingly, it passed, but the same set of keystrokes was not working as expected in Onivim.

I checked the logging I added for onivim/libvim#223, and the code path that handles the 'in' motion in visual mode wasn't being hit. It turns out, our terminal key-bindings are incorrectly defined, and were getting engaged in this case (since we manage terminal insert <-> normal transition in Onivim, we have keybindings that handle keys like 'i', but there were getting engaged in the vi" case, even though they shouldn't).

Fix: Scope the insert-mode transition keys (i/a/etc) to only the case where the terminal is focused and we're in normal mode. Move them to be local to the terminal feature.

Fixes #2413
Fixes #1880
Fixes #2270

Copy link
Member Author

bryphe commented Sep 9, 2020

/azp run

1 similar comment
Copy link
Member Author

bryphe commented Sep 10, 2020

/azp run

@bryphe bryphe merged commit 6a758ea into master Sep 11, 2020
2 checks passed
@bryphe bryphe deleted the fix/vim/2413/vi-motion branch September 11, 2020 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
1 participant