summaryrefslogtreecommitdiff
path: root/src/testdir/test_viminfo.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-12-27 17:33:26 +0100
committerBram Moolenaar <Bram@vim.org>2019-12-27 17:33:26 +0100
commit8cd6cd8087ccf08e4303dbf5f732fc4b82b917e1 (patch)
tree3db4f208a27870f88bc8bfe4a290caa2b33062bb /src/testdir/test_viminfo.vim
parent297610ba4b110c918ffe60c45eb4a1d6ea2daae5 (diff)
downloadvim-git-8cd6cd8087ccf08e4303dbf5f732fc4b82b917e1.tar.gz
patch 8.2.0050: after deleting a file mark it is still in viminfov8.2.0050
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)
Diffstat (limited to 'src/testdir/test_viminfo.vim')
-rw-r--r--src/testdir/test_viminfo.vim17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/testdir/test_viminfo.vim b/src/testdir/test_viminfo.vim
index a9dc8fd31..78e0f1a81 100644
--- a/src/testdir/test_viminfo.vim
+++ b/src/testdir/test_viminfo.vim
@@ -323,6 +323,23 @@ func Test_viminfo_marks()
call assert_equal([bufb, 22, 1, 0], getpos("'3")) " time 30
call assert_equal([bufb, 12, 1, 0], getpos("'4")) " time 25
+ " deleted file marks are removed from viminfo
+ delmark C
+ wviminfo Xviminfo
+ rviminfo Xviminfo
+ call assert_equal([0, 0, 0, 0], getpos("'C"))
+
+ " deleted file marks stay in viminfo if defined in another vim later
+ call test_settime(70)
+ call setpos("'D", [bufb, 8, 1, 0])
+ wviminfo Xviminfo
+ call test_settime(65)
+ delmark D
+ call assert_equal([0, 0, 0, 0], getpos("'D"))
+ call test_settime(75)
+ rviminfo Xviminfo
+ call assert_equal([bufb, 8, 1, 0], getpos("'D"))
+
call delete('Xviminfo')
exe 'bwipe ' . bufa
exe 'bwipe ' . bufb