Wrong cursor position after using same file in two panels
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
Describe the bug
This is the same as #2688, which, according to the ticket, was fixed at least 5 years ago. I'm observing it now. I'm a new vscode user, I've been using it for a few months and I don't use split panels very often, so I'm not certain whether it has been doing it since I originally installed it (most likely) or whether it started doing it later.
To Reproduce
Steps to reproduce the behavior:
- Open a file
- In normal mode, type ":split".
- While you are in the top pane, type
50Gto go to line 50. - Type Ctrl+W,j to go to the bottom pane, then
300Gto go to line 300. - Type Ctrl+W,k to go to the top pane.
- Observe that, in the top pane, the cursor is now on line 300.
Expected behavior
I expected to be in line 50.
Screenshots
Here's a 20-second video that demonstrates: https://www.loom.com/share/78965a1754a7411da9a5c1262456eb18
Environment (please complete the following information):
- Extension (VsCodeVim) version: 1.30.1
- VSCode version: 1.103.0
- OS: Debian 13.0 "Trixie"
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in VS Code with the VSCodeVim extension using the listed split-pane and Ctrl+W navigation steps. Start by tracing how cursor positions are stored when the same file is shown in both panes, and compare the behavior with issue #2688. Done means returning to the top pane restores line 50 rather than line 300.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100