VSCodeVim / VSCodeVim/Vim

bug: count + k (upward jump) is inaccurate when vim.foldfix is true and word wrap is enabled

Open
#9,885 0 comments 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
When vim.foldfix is set to true and Line Wrap is enabled, vertical movement using count + k (relative line jumps) becomes inaccurate. The cursor fails to land on the line indicated by the relative line number. This issue is consistently reproducible in .tex files and untitled files.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new Untitled file (or open a .tex file) and paste several lines of text.
  2. Enable Line Wrap in settings ("editor.wordWrap": "on").
  3. Set "vim.foldfix": true in settings.json.
  4. Use a count to jump upward, e.g., type 10k. (across a wrapped line)
  5. See error: The cursor lands on the wrong line (offset from the expected relative line number).

Expected behavior
The cursor should move precisely to the relative line number specified by the count, even when foldfix is enabled and lines are wrapped.

Screenshots

Image

(I first typed "k, k", it looks good; then I typed "2, k", it works like "2, g, k")

Environment (please complete the following information):

  • Extension (VsCodeVim) version: 1.32.4
  • Cursor Version: 0.45.11 (Universal) / VSCode version: 1.96.2
  • OS: macOS 15.6 24G84 arm64

Additional context
no

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 problem in an untitled file and a .tex file with editor.wordWrap set to on and vim.foldfix set to true. Start by tracing the count+k movement behavior and compare wrapped versus unwrapped lines. Done means a command such as 10k lands on the precise relative line indicated by the count.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.