aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2016-12-12 14:34:18 -0500
committerJames McCoy <jamessan@jamessan.com>2016-12-12 14:35:09 -0500
commit7eb91c781b2a464c21c09c3919a74778936a33b3 (patch)
tree251cafc1cea0e50a8e20e643292305adea76c6de /test
parent988ab5804a16beafff26b487b0612cb7cf97ea09 (diff)
downloadrneovim-7eb91c781b2a464c21c09c3919a74778936a33b3.tar.gz
rneovim-7eb91c781b2a464c21c09c3919a74778936a33b3.tar.bz2
rneovim-7eb91c781b2a464c21c09c3919a74778936a33b3.zip
shada: Respect the optional buffer count for shada-%
Closes #5759
Diffstat (limited to 'test')
-rw-r--r--test/functional/shada/buffers_spec.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/functional/shada/buffers_spec.lua b/test/functional/shada/buffers_spec.lua
index 01952560d6..7e6338897a 100644
--- a/test/functional/shada/buffers_spec.lua
+++ b/test/functional/shada/buffers_spec.lua
@@ -89,4 +89,16 @@ describe('ShaDa support code', function()
eq(1, funcs.bufnr('$'))
eq('', funcs.bufname(1))
end)
+
+ it('restores 1 buffer with %1 in &shada, #5759', function()
+ set_additional_cmd('set shada+=%1')
+ reset()
+ nvim_command('edit ' .. testfilename)
+ nvim_command('edit ' .. testfilename_2)
+ nvim_command('qall')
+ reset()
+ eq(2, funcs.bufnr('$'))
+ eq('', funcs.bufname(1))
+ eq(testfilename, funcs.bufname(2))
+ end)
end)