neovim/test/functional/normal
butwerenotthereyet 39094b3fae jumplist: browser-style (or 'tagstack') navigation #11530
Traditionally, when navigating to a specific location from the middle of
the jumplist results in shifting the current location to the bottom of
the list and adding the new location after it.  This behavior is not
desireable to all users--see, for example
https://vi.stackexchange.com/questions/18344/how-to-change-jumplist-behavior.

Here, another jumplist behavior is introduced.  When jumpoptions (a new
option set added here) includes stack, the jumplist behaves like the
tagstack or like history in a web browser.  That is, when navigating to
a location from the middle of the jumplist

    2 first
    1 second
    0 third <-- current location
    1 fourth
    2 fifth

to a new location the locations after the current location in the jump
list are discarded

    2 first
    1 second
    0 third
            <-- current location

The result is that when moving forward from that location, the new
location will be appended to the jumplist:

    3 first
    2 second
    1 third
    0 new

If the new location is the same

  new == second

as some previous (but not immediately prior) entry in the jumplist,

    2 first
    1 second
    0 third <-- current location
    1 fourth
    2 fifth

both occurrences preserved

    3 first
    2 second
    1 third
    0 second (new)

when moving forward from that location.

It would be desireable to go farther and, when the new location is the
same as the location that is currently next in the jumplist,

    new == fourth

make the result of navigating to the new location by jumping (e.g. 50gg)
be the same as moving forward in the jumplist

    2 first
    1 second
    0 third
    1 new <-- current location
    2 fifth

and simply increment the jumplist index.  That change is NOT part of
this patch because it would require passing the new cursor location to
the function (setpcmark) from all of its callees.  That in turn would
require those callees to know *before* calling what the new cursor
location is, which do they do not currently.
2019-12-10 00:56:56 -08:00
..
count_spec.lua functests: Replace execute with either command or feed_command 2017-04-09 03:24:08 +03:00
fold_spec.lua fold: foldMoveRange(): fix :move bug #6534 2017-04-17 04:45:55 +02:00
jump_spec.lua jumplist: browser-style (or 'tagstack') navigation #11530 2019-12-10 00:56:56 -08:00
K_spec.lua test: enable K_spec tests in Windows 2018-01-03 00:12:28 -05:00
lang_spec.lua ci: install Turkish locale and make locale tests more reliable 2017-04-11 10:24:19 +02:00
langmap_spec.lua Add some tests for 'langmap' 2018-01-27 11:20:10 +00:00
macro_spec.lua Add some basic tests for macros 2018-03-14 10:39:14 +00:00
put_spec.lua doc + extmarks tweaks #11421 2019-11-25 01:08:02 -08:00
search_spec.lua test: Eliminate expect_err 2019-09-06 17:19:07 -07:00
undo_spec.lua functests: Replace execute with either command or feed_command 2017-04-09 03:24:08 +03:00