VSCodeVim / VSCodeVim/Vim

Moving cursor up/down after jumping to symbol does not retain its horizontal position

Open
#7,729 1 comment 5 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
After jumping to a symbol the cursor does not retain its horizontal position when moving vertically with j/k.

To Reproduce
Steps to reproduce the behavior:

  1. Go to any file with symbols
  2. Click on any symbol in the outline or use ctrl/cmd+shift+o to search for one, and press enter.
  3. Cursor should now be at the start of the selected symbol.
  4. Move cursor vertically with j/k; the cursor's horizontal position snaps back to its previous position before you jumped to the symbol.

Expected behavior
Cursor should retain its horizontal position at the start of the symbol when moving vertically with j/k.

Screenshots
If applicable, add screenshots to help explain your problem.
If remapping-related, please attach log output: https://github.com/VSCodeVim/Vim#debugging-remappings.

https://user-images.githubusercontent.com/32964293/170922781-c73db4a9-101c-4459-b587-21d66b83137e.mov

Environment (please complete the following information):

  • Extension (VsCodeVim) version: 1.22.2
  • VSCode version: 1.67.2
  • OS: MacOS Big Sur 11.6.6

Additional context
Add any other context about the problem here.

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 VSCodeVim using the outline or Ctrl/Cmd+Shift+O to jump to a symbol, then move vertically with j/k. Trace the symbol-jump and vertical-motion handling; done means the cursor remains horizontally aligned with the start of the selected symbol. The issue does not name a file or test to run.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
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.