From ee56daebb6468075e743db0d605cb3f2a1699419 Mon Sep 17 00:00:00 2001 From: Maria José Solano Date: Wed, 30 Aug 2023 19:15:49 -0700 Subject: fix(shada): update deleted marks (#24936) Fix #4295 Close #16067 Co-authored-by: chentau --- test/functional/shada/marks_spec.lua | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'test/functional') diff --git a/test/functional/shada/marks_spec.lua b/test/functional/shada/marks_spec.lua index a91be18841..07364382e8 100644 --- a/test/functional/shada/marks_spec.lua +++ b/test/functional/shada/marks_spec.lua @@ -3,6 +3,7 @@ local helpers = require('test.functional.helpers')(after_each) local meths, curwinmeths, curbufmeths, nvim_command, funcs, eq = helpers.meths, helpers.curwinmeths, helpers.curbufmeths, helpers.command, helpers.funcs, helpers.eq +local feed = helpers.feed local exc_exec, exec_capture = helpers.exc_exec, helpers.exec_capture local expect_exit = helpers.expect_exit @@ -248,4 +249,24 @@ describe('ShaDa support code', function() eq('', funcs.system(argv)) eq(0, exc_exec('rshada')) end) + + it('updates deleted marks', function() + nvim_command('edit ' .. testfilename) + + nvim_command('mark A') + nvim_command('mark a') + -- create a change to set the '.' mark, + -- since it can't be set via :mark + feed('ggifoobar') + nvim_command('wshada') + nvim_command('normal! `A`a`.') + + nvim_command('delmarks A a .') + nvim_command('wshada') + + reset() + eq('Vim(normal):E20: Mark not set', exc_exec('normal! `A')) + eq('Vim(normal):E20: Mark not set', exc_exec('normal! `a')) + eq('Vim(normal):E20: Mark not set', exc_exec('normal! `.')) + end) end) -- cgit