0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.0853: ml_delete() often called with FALSE argument

Problem:    ml_delete() often called with FALSE argument.
Solution:   Use ml_delete_flags(x, ML_DEL_MESSAGE) when argument is TRUE.
This commit is contained in:
Bram Moolenaar
2020-05-30 20:30:46 +02:00
parent d6cd5ffade
commit ca70c07b72
22 changed files with 52 additions and 50 deletions

View File

@@ -633,7 +633,7 @@ ex_sort(exarg_T *eap)
// delete the original lines if appending worked
if (i == count)
for (i = 0; i < count; ++i)
ml_delete(eap->line1, FALSE);
ml_delete(eap->line1);
else
count = 0;
@@ -779,7 +779,7 @@ do_move(linenr_T line1, linenr_T line2, linenr_T dest)
return FAIL;
for (l = line1; l <= line2; l++)
ml_delete(line1 + extra, TRUE);
ml_delete_flags(line1 + extra, ML_DEL_MESSAGE);
if (!global_busy && num_lines > p_report)
smsg(NGETTEXT("%ld line moved", "%ld lines moved", num_lines),
@@ -3280,7 +3280,7 @@ ex_append(exarg_T *eap)
if (empty)
{
ml_delete(2L, FALSE);
ml_delete(2L);
empty = FALSE;
}
}
@@ -3331,7 +3331,7 @@ ex_change(exarg_T *eap)
{
if (curbuf->b_ml.ml_flags & ML_EMPTY) // nothing to delete
break;
ml_delete(eap->line1, FALSE);
ml_delete(eap->line1);
}
// make sure the cursor is not beyond the end of the file now
@@ -4531,7 +4531,7 @@ skip:
if (u_savedel(lnum, nmatch_tl) != OK)
break;
for (i = 0; i < nmatch_tl; ++i)
ml_delete(lnum, (int)FALSE);
ml_delete(lnum);
mark_adjust(lnum, lnum + nmatch_tl - 1,
(long)MAXLNUM, -nmatch_tl);
if (subflags.do_ask)