0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.2.1954: Vim9: not all command modifiers are tested

Problem:    Vim9: not all command modifiers are tested.
Solution:   Add tests for "keep" modifiers.  Fix that marks are lost even
            though ":lockmarks" is used.
This commit is contained in:
Bram Moolenaar
2020-11-04 18:02:44 +01:00
parent 631e8f9345
commit f65b35b446
3 changed files with 46 additions and 5 deletions

View File

@@ -1254,6 +1254,16 @@ do_filter(
if (read_linecount >= linecount)
// move all marks from old lines to new lines
mark_adjust(line1, line2, linecount, 0L);
else if (save_cmod_flags & CMOD_LOCKMARKS)
{
// Move marks from the lines below the new lines down by
// the number of lines lost.
// Move marks from the lines that will be deleted to the
// new lines and below.
mark_adjust(line2 + 1, (linenr_T)MAXLNUM,
linecount - read_linecount, 0L);
mark_adjust(line1, line2, linecount, 0L);
}
else
{
// move marks from old lines to new lines, delete marks