aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api/vim_spec.lua
diff options
context:
space:
mode:
authorAbdelhakeem Osama <abdelhakeem.osama@hotmail.com>2019-09-03 19:18:24 +0200
committerJustin M. Keyes <justinkz@gmail.com>2019-09-03 10:18:24 -0700
commit8b8ecf44f2cda43bbd710ec22ef99439b71888cd (patch)
treea98ade179a519f41f0445c436f7538896db0ef35 /test/functional/api/vim_spec.lua
parentb8f2436febcc5d68e572d3703a21368e69ac1cb8 (diff)
downloadrneovim-8b8ecf44f2cda43bbd710ec22ef99439b71888cd.tar.gz
rneovim-8b8ecf44f2cda43bbd710ec22ef99439b71888cd.tar.bz2
rneovim-8b8ecf44f2cda43bbd710ec22ef99439b71888cd.zip
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.
Diffstat (limited to 'test/functional/api/vim_spec.lua')
-rw-r--r--test/functional/api/vim_spec.lua8
1 files changed, 3 insertions, 5 deletions
diff --git a/test/functional/api/vim_spec.lua b/test/functional/api/vim_spec.lua
index 5df86b3261..07c0c5c8f3 100644
--- a/test/functional/api/vim_spec.lua
+++ b/test/functional/api/vim_spec.lua
@@ -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([[