[vim/vim] $ + gk doesn't go to char above instead goes to EOL on line above (Issue #19958)

5 views
Skip to first unread message

alf171

unread,
Apr 11, 2026, 2:32:52 PM (10 hours ago) Apr 11
to vim/vim, Subscribed
alf171 created an issue (vim/vim#19958)

Steps to reproduce

  1. ran ./src/vim -Nu NONE -U NONE --noplugin,
  2. filled the entire first line until it wrapped
  3. did ^ to go to start of line
  4. did $ to go to end of line
  5. gk to go one char above

Expected behaviour

Instead of going one char above, we go to EOL (on the previous virtual line) because $ sets MAX_COL naively. IMO, this is strange behavior because if you move on char left and the right, it moves to the virtual line above.

I recognize this could break keymaps like $gk which previously went to EOL of the virtual line but i feel like this is a bit of anti pattern if it was done intentionally.

Version of Vim

9.2.0338

Environment

OS: Mac, Darwin
TERMINAL: tmux + ghostty
TERM: tmux-256color
SHELL: /bin/zsh

Logs and stack traces


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/19958@github.com>

alf171

unread,
Apr 11, 2026, 2:38:08 PM (10 hours ago) Apr 11
to vim/vim, Subscribed
alf171 left a comment (vim/vim#19958)

I’m happy to work on a fix if this is considered a bug. I was able to put together a hacky change and verified that it behaves the way I expected, but I wanted to get more opinions on what the intended behavior should be before moving forward. Thanks!


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/19958/4229964027@github.com>

alf171

unread,
Apr 11, 2026, 7:00:54 PM (6 hours ago) Apr 11
to vim/vim, Subscribed
alf171 left a comment (vim/vim#19958)

Only i think g_ is what i'm looking for not $. going to resolve although it feels a bit unintuitive to me


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/19958/4230331292@github.com>

alf171

unread,
Apr 11, 2026, 7:00:55 PM (6 hours ago) Apr 11
to vim/vim, Subscribed

Closed #19958 as completed.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/19958/issue_event/24413425156@github.com>

Reply all
Reply to author
Forward
0 new messages