From 4f53ebaceb263f29049be74ea2d2e1f0c51a8e71 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Mon, 4 Jan 2021 01:15:41 -0500 Subject: [PATCH] vim-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 vim/vim#5401, closes vim/vim#1339) https://github.com/vim/vim/commit/8cd6cd8087ccf08e4303dbf5f732fc4b82b917e1 Neovim's ShaDa is incompatible with Vim's "viminfo" so "viminfo" tests fail. N/A patches for version.c: vim-patch:8.1.1731: command line history not read from viminfo on startup Problem: Command line history not read from viminfo on startup. Solution: Get history length after initializing it. https://github.com/vim/vim/commit/26b654a5df9414e43734eb4c956b67c331d70a50 vim-patch:8.1.1764: ":browse oldfiles" is not tested Problem: ":browse oldfiles" is not tested. Solution: Add a test. https://github.com/vim/vim/commit/5328cb8986d2620f45b41acf28778f8ce2f8cac1 vim-patch:8.1.2111: viminfo file not sufficiently tested Problem: Viminfo file not sufficiently tested. Solution: Add more tests. (Yegappan Lakshmanan, closes vim/vim#5009) https://github.com/vim/vim/commit/2a8d3b8997d4fe94bc9c02ae04e873eab2f13b09 vim-patch:8.1.2126: viminfo not sufficiently tested Problem: Viminfo not sufficiently tested. Solution: Add more test cases. Clean up comments. (Yegappan Lakshmanan, closes vim/vim#5032) https://github.com/vim/vim/commit/6bd1d7706766a7899904163e8fd55ea117fb1953 --- src/nvim/mark.c | 1 + src/nvim/testdir/test_marks.vim | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/src/nvim/mark.c b/src/nvim/mark.c index 45ca097033..73a9c1d1d7 100644 --- a/src/nvim/mark.c +++ b/src/nvim/mark.c @@ -777,6 +777,7 @@ void ex_delmarks(exarg_T *eap) n = i - 'A'; } namedfm[n].fmark.mark.lnum = 0; + namedfm[n].fmark.fnum = 0; XFREE_CLEAR(namedfm[n].fname); } } diff --git a/src/nvim/testdir/test_marks.vim b/src/nvim/testdir/test_marks.vim index e25fe33bb7..2fd82a4b6d 100644 --- a/src/nvim/testdir/test_marks.vim +++ b/src/nvim/testdir/test_marks.vim @@ -171,6 +171,11 @@ func Test_delmarks() " Deleting an already deleted mark should not fail. delmarks x + " getpos() should return all zeros after deleting a filemark. + norm mA + delmarks A + call assert_equal([0, 0, 0, 0], getpos("'A")) + " Test deleting a range of marks. norm ma norm mb