Vim: Wrong cursor position after using same file in two panels
Is this a BUG REPORT or FEATURE REQUEST? (choose one):
It’s a bug report
What happened:
- Open same file in two panels (i.e. side by side) with vim mode enabled
- At one buffer (A) jump to line 10
- At second buffer (B) click at line 20
- Get back to buffer A (at this point we are at line 10) and hit
j
(for vim “down by line” move) - I am taken to line 21
What did you expect to happen:
At point 5 I should be taken to line 11.
How to reproduce it (as minimally and precisely as possible):
I’ve described it at the What happened section. Here is a video.
Environment:
- Extension (VsCodeVim) version: 0.12.0
- VSCode version: 1.23.1
- OS version: 10.13.2 (17C88)
Update
Seems like reverting one change helped. I’ve created a PR.
For v0.14+ fix please see the comment
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 39
- Comments: 19 (12 by maintainers)
Commits related to this issue
- Fixed #2688. Revert "Removed viewcolumn from editoridentity information" This reverts commit 1c81cf3e657320a015e911ceee3fd07b0a6dda4c. — committed to lukaszb/Vim by lukaszb 6 years ago
- fix - cursor position whenever changing editors - closes #2688 — committed to captaincaius/Vim by captaincaius 6 years ago
- fix (simpler) - cursor whenever changing editors - closes #2688 — committed to captaincaius/Vim by captaincaius 6 years ago
- Merge pull request #3103 from captaincaius/active-text-editor-eventhandler-fix fix (simpler) - cursor whenever changing editors - closes #2688 — committed to VSCodeVim/Vim by xconverge 6 years ago
Thanks @chibicode. For folks following this issue, please thumbs upstream vscode issue!
Seems this would be fixed in near future but it still breaks at 0.14. Here is a diff one can use to fix the issue (but note that this will bring back another issue with undo).
you can apply it with
patch -p0 < FILENAME
at~/.vscode/extensions/vscodevim.vim-0.14.0/
Updated patch for 0.16: