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

This reverts commit 8b8ecf44f2.
Fix #21082.

(cherry picked from commit 6fe9fbdd2f)
This commit is contained in:
zeertzjq
2023-01-18 09:11:37 +08:00
committed by github-actions[bot]
parent 383cddd784
commit fec5b0f164
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', ''))
}