comparison src/testdir/test_viminfo.vim @ 18979:de2d1820215a v8.2.0050

patch 8.2.0050: after deleting a file mark it is still in viminfo Commit: https://github.com/vim/vim/commit/8cd6cd8087ccf08e4303dbf5f732fc4b82b917e1 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Dec 27 17:33:26 2019 +0100 patch 8.2.0050: after deleting a file mark it is still in viminfo Problem: After deleting a file mark it is still in viminfo. Solution: When a file mark was deleted more recently than the mark in the merged viminfo file was updated, do not store the mark. (Pavol Juhas, closes #5401, closes #1339)
author Bram Moolenaar <Bram@vim.org>
date Fri, 27 Dec 2019 17:45:04 +0100
parents f6dcf7eabd26
children 031184ace7c5
comparison
equal deleted inserted replaced
18978:51c1bf5c3bb0 18979:de2d1820215a
321 call assert_equal([bufb, 1, 1, 0], getpos("'1")) " time 45 321 call assert_equal([bufb, 1, 1, 0], getpos("'1")) " time 45
322 call assert_equal([bufa, 11, 1, 0], getpos("'2")) " time 35 322 call assert_equal([bufa, 11, 1, 0], getpos("'2")) " time 35
323 call assert_equal([bufb, 22, 1, 0], getpos("'3")) " time 30 323 call assert_equal([bufb, 22, 1, 0], getpos("'3")) " time 30
324 call assert_equal([bufb, 12, 1, 0], getpos("'4")) " time 25 324 call assert_equal([bufb, 12, 1, 0], getpos("'4")) " time 25
325 325
326 " deleted file marks are removed from viminfo
327 delmark C
328 wviminfo Xviminfo
329 rviminfo Xviminfo
330 call assert_equal([0, 0, 0, 0], getpos("'C"))
331
332 " deleted file marks stay in viminfo if defined in another vim later
333 call test_settime(70)
334 call setpos("'D", [bufb, 8, 1, 0])
335 wviminfo Xviminfo
336 call test_settime(65)
337 delmark D
338 call assert_equal([0, 0, 0, 0], getpos("'D"))
339 call test_settime(75)
340 rviminfo Xviminfo
341 call assert_equal([bufb, 8, 1, 0], getpos("'D"))
342
326 call delete('Xviminfo') 343 call delete('Xviminfo')
327 exe 'bwipe ' . bufa 344 exe 'bwipe ' . bufa
328 exe 'bwipe ' . bufb 345 exe 'bwipe ' . bufb
329 endfunc 346 endfunc
330 347