Skip to content

Fixed some issues with the jump list - #1393

Open
jorbakk wants to merge 1 commit into
martanne:masterfrom
jorbakk:jumplist
Open

Fixed some issues with the jump list#1393
jorbakk wants to merge 1 commit into
martanne:masterfrom
jorbakk:jumplist

Conversation

@jorbakk

@jorbakk jorbakk commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

The current implentation of the jump list has some issues, notably the following two:

  1. When changing direction while navigating through the jump list, the mark where the direction is changes is jumped twice. So the cursor is kept on the same mark but it is expected to jump directly to the previous mark.
    This can be reproduced by saving three marks in the jump list (in an arbitrary file) on three subsequent lines with:
    gsjgsjgsj
    then navigate back and forth using a sequence like:
    g<g<g>g>
    when changing direction of navigation, g> needs to be typed twice before taking any effect.

  2. Moving beyond the end of the jump list generates empty, zero-initialized marks that need to be skipped when navigating through them. Creating new and valid jump list entries afterwards leaves empty marks in the list.
    To reproduce, store two marks in the jump list:
    gsjg>g>g>gsj
    now, we need to do 5 times g< to navigate back to the first mark, instead of having to jump two times only which would be expected in a list of two marks.

The patch below is a rewrite of the jump list handling code and should provide a more correct implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant