mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 19:38:20 +00:00
shada/context: fully remove jumplist duplicates #10898
- Always load files when cleaning up jumplist. - For Shada: avoids writing duplicate entries, which happens when you read from a shada file with duplicate entries (merging the jumplist while writing sometimes produces duplicate entries, bug?) and then write right away (i.e.: without any `:jumps`, `getjumplist()`, or any jump movement, that is: nothing that calls `cleanup_jumplist` with `loadfiles == true`). - For Context: avoids non-idempotent behavior for the same reason (i.e.: first call to `shada_encode_jumps` does not remove duplicate entries). - Do not set pcmark when dumping jumplist for Context. - Retrieving current Context shouldn't add an entry to the jumplist (which will be removed by a subsequent `cleanup_jumplist` anyway, i.e.: tail entry matching current position), just act like `getjumplist` for instance.
This commit is contained in:

committed by
Justin M. Keyes

parent
b8f2436feb
commit
8b8ecf44f2
@@ -922,11 +922,9 @@ describe('API', function()
|
||||
},
|
||||
|
||||
['jumps'] = eval(([[
|
||||
filter(map(add(
|
||||
getjumplist()[0], { 'bufnr': bufnr('%'), 'lnum': getcurpos()[1] }),
|
||||
'filter(
|
||||
{ "f": expand("#".v:val.bufnr.":p"), "l": v:val.lnum },
|
||||
{ k, v -> k != "l" || v != 1 })'), '!empty(v:val.f)')
|
||||
filter(map(getjumplist()[0], 'filter(
|
||||
{ "f": expand("#".v:val.bufnr.":p"), "l": v:val.lnum },
|
||||
{ k, v -> k != "l" || v != 1 })'), '!empty(v:val.f)')
|
||||
]]):gsub('\n', '')),
|
||||
|
||||
['buflist'] = eval([[
|
||||
|
Reference in New Issue
Block a user