diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-11-04 18:02:44 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-11-04 18:02:44 +0100 |
commit | f65b35b4465d3622128bd82bd3775f833542eb1f (patch) | |
tree | c11ea8b67a681f82d3b68334f6a079ab3f3fa741 /src/ex_cmds.c | |
parent | 631e8f93458b102091d54c502f489c03e454d4da (diff) |
patch 8.2.1954: Vim9: not all command modifiers are testedv8.2.1954
Problem: Vim9: not all command modifiers are tested.
Solution: Add tests for "keep" modifiers. Fix that marks are lost even
though ":lockmarks" is used.
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r-- | src/ex_cmds.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c index de4b806b27..185033f1d5 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -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 |