Mercurial > vim
diff src/ex_cmds.c @ 20599:d571231175b4 v8.2.0853
patch 8.2.0853: ml_delete() often called with FALSE argument
Commit: https://github.com/vim/vim/commit/ca70c07b72c24aae3d141e67d08f50361f051af5
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat May 30 20:30:46 2020 +0200
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 30 May 2020 20:45:03 +0200 |
parents | 18c52f380193 |
children | c4bce986c31a |
line wrap: on
line diff
--- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -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, 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)