revert: "shada/context: fully remove jumplist duplicates #10898" (#21874)

This reverts commit 8b8ecf44f2.
It is causing performance problems on exit.
Fix #21082.
This commit is contained in:
zeertzjq
2023-01-23 19:32:27 +08:00
committed by GitHub
parent 0371d0f7af
commit 3b75485043
4 changed files with 27 additions and 25 deletions

View File

@@ -287,9 +287,11 @@ describe('context functions', function()
local with_jumps = {
['jumps'] = eval(([[
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)')
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)')
]]):gsub('\n', ''))
}