aboutsummaryrefslogtreecommitdiff
path: root/test/functional/shada/marks_spec.lua
diff options
context:
space:
mode:
authorMaria José Solano <majosolano99@gmail.com>2023-09-02 19:34:09 -0700
committerGitHub <noreply@github.com>2023-09-03 10:34:09 +0800
commit517dfdf0fcf5c9c88c83dbb77a931b8e940b7472 (patch)
treeb87508979336d33fe0284623e7ac3745071b2a50 /test/functional/shada/marks_spec.lua
parent36cb3262b93d8e60f9c5bffc8c820838860b302c (diff)
downloadrneovim-517dfdf0fcf5c9c88c83dbb77a931b8e940b7472.tar.gz
rneovim-517dfdf0fcf5c9c88c83dbb77a931b8e940b7472.tar.bz2
rneovim-517dfdf0fcf5c9c88c83dbb77a931b8e940b7472.zip
fix(shada): update marks when using delmarks! (#24978)
Diffstat (limited to 'test/functional/shada/marks_spec.lua')
-rw-r--r--test/functional/shada/marks_spec.lua22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/functional/shada/marks_spec.lua b/test/functional/shada/marks_spec.lua
index a73e9a244d..7f03022ab8 100644
--- a/test/functional/shada/marks_spec.lua
+++ b/test/functional/shada/marks_spec.lua
@@ -272,4 +272,26 @@ describe('ShaDa support code', function()
eq('Vim(normal):E20: Mark not set', exc_exec('normal! `a'))
eq('Vim(normal):E20: Mark not set', exc_exec('normal! `.'))
end)
+
+ it('updates deleted marks with :delmarks!', function()
+ nvim_command('edit ' .. testfilename)
+
+ nvim_command('mark A')
+ nvim_command('mark a')
+ feed('ggifoobar<esc>')
+ nvim_command('wshada')
+
+ reset()
+ nvim_command('edit ' .. testfilename)
+ nvim_command('normal! `A`a`.')
+ nvim_command('delmarks!')
+ nvim_command('wshada')
+
+ reset()
+ nvim_command('edit ' .. testfilename)
+ eq('Vim(normal):E20: Mark not set', exc_exec('normal! `a'))
+ eq('Vim(normal):E20: Mark not set', exc_exec('normal! `.'))
+ -- Make sure that uppercase marks aren't deleted.
+ nvim_command('normal! `A')
+ end)
end)