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)
8cd6cd8087

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.
26b654a5df

vim-patch:8.1.1764: ":browse oldfiles" is not tested

Problem:    ":browse oldfiles" is not tested.
Solution:   Add a test.
5328cb8986

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)
2a8d3b8997

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)
6bd1d77067
This commit is contained in:
Jan Edmund Lazo
2021-01-04 01:15:41 -05:00
parent adbf2dd86b
commit 4f53ebaceb
2 changed files with 6 additions and 0 deletions

View File

@@ -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);
}
}

View File

@@ -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