comparison src/ex_cmds.c @ 22812:1ef3b04875ff v8.2.1954

patch 8.2.1954: Vim9: not all command modifiers are tested Commit: https://github.com/vim/vim/commit/f65b35b4465d3622128bd82bd3775f833542eb1f Author: Bram Moolenaar <Bram@vim.org> Date: Wed Nov 4 18:02:44 2020 +0100 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.
author Bram Moolenaar <Bram@vim.org>
date Wed, 04 Nov 2020 18:15:03 +0100
parents 3e4981de5636
children 7c1e2e3f2d8d
comparison
equal deleted inserted replaced
22811:f2e4940ef271 22812:1ef3b04875ff
1252 || vim_strchr(p_cpo, CPO_REMMARK) == NULL) 1252 || vim_strchr(p_cpo, CPO_REMMARK) == NULL)
1253 { 1253 {
1254 if (read_linecount >= linecount) 1254 if (read_linecount >= linecount)
1255 // move all marks from old lines to new lines 1255 // move all marks from old lines to new lines
1256 mark_adjust(line1, line2, linecount, 0L); 1256 mark_adjust(line1, line2, linecount, 0L);
1257 else if (save_cmod_flags & CMOD_LOCKMARKS)
1258 {
1259 // Move marks from the lines below the new lines down by
1260 // the number of lines lost.
1261 // Move marks from the lines that will be deleted to the
1262 // new lines and below.
1263 mark_adjust(line2 + 1, (linenr_T)MAXLNUM,
1264 linecount - read_linecount, 0L);
1265 mark_adjust(line1, line2, linecount, 0L);
1266 }
1257 else 1267 else
1258 { 1268 {
1259 // move marks from old lines to new lines, delete marks 1269 // move marks from old lines to new lines, delete marks
1260 // that are in deleted lines 1270 // that are in deleted lines
1261 mark_adjust(line1, line1 + read_linecount - 1, 1271 mark_adjust(line1, line1 + read_linecount - 1,