Skip to content

Relative line number motions do not work correctly when word wrap is enabled #223

@jamessimas

Description

@jamessimas

Description of the bug

With the following conditions...

  • Vintage mode enabled
  • Relative line numbers enabled ("relative_line_numbers": true)
  • Word Wrap enabled

...relative line number motions do not work correctly. Rather than taking me N lines up/down, they take me N wrapped-lines up/down. (See screenshot for exact behavior description. It's hard to describe in words.)

This happens every time lines wrap and there is no workaround that I am aware of.

This works as expected in both VIM 9.0 and NeoVIM v0.10.1.

Image

Steps to reproduce

  1. Open a plain text which has long lines file in Sublime Text
  2. Enable Vintage mode
  3. Enable relative line numbers ("relative_line_numbers": true)
  4. Enable Word Wrap
  5. Attempt to use relative line motions (e.g., 2j, 4k, etc.) to move. Notice that they do not work as expected.

Expected behavior

When using relative line motions to navigate when Word Wrap is enabled, the motions will take me to the correct line.

Actual behavior

When using relative line motions to navigate when Word Wrap is enabled, the line motions take me to the wrong line every time.

Sublime Text build number

4180

Operating system & version

macOS 14.6.1

(Linux) Desktop environment and/or window manager

No response

Additional information

No response

OpenGL context information

No response

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