Skip to content

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

@guox18

Description

@guox18

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions