Merge #5079 from ZyX-I/shada-save-current-pos

shada: Save current cursor position before saving jumps
This commit is contained in:
Justin M. Keyes
2017-01-07 23:15:50 +01:00
committed by GitHub
3 changed files with 86 additions and 38 deletions

View File

@@ -153,6 +153,19 @@ describe('ShaDa support code', function()
eq(saved, redir_exec('jumps'))
end)
it('when dumping jump list also dumps current position', function()
nvim_command('edit ' .. testfilename)
nvim_command('normal! G')
nvim_command('split ' .. testfilename_2)
nvim_command('normal! G')
nvim_command('wshada')
nvim_command('quit')
nvim_command('rshada')
nvim_command('normal! \15') -- <C-o>
eq(testfilename_2, funcs.bufname('%'))
eq({2, 0}, curwinmeths.get_cursor())
end)
it('is able to dump and restore jump list with different times (slow!)',
function()
nvim_command('edit ' .. testfilename_2)