VSCodeVim / VSCodeVim/Vim

Wrong cursor position after using same file in two panels

Open
#9,727 1 comment 0 reactions 0 assignees View on GitHub

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:

  1. Open a file
  2. In normal mode, type ":split".
  3. While you are in the top pane, type 50G to go to line 50.
  4. Type Ctrl+W,j to go to the bottom pane, then 300G to go to line 300.
  5. Type Ctrl+W,k to go to the top pane.
  6. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.