vim-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.

ca70c07b72

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
Jan Edmund Lazo
2025-08-18 20:37:33 -04:00
parent e77d15cc5d
commit dc2d4b07a8
13 changed files with 28 additions and 30 deletions

View File

@@ -3814,7 +3814,7 @@ static void diffgetput(const int addr_count, const int idx_cur, const int idx_fr
for (int i = 0; i < count; i++) {
// remember deleting the last line of the buffer
buf_empty = curbuf->b_ml.ml_line_count == 1;
if (ml_delete(lnum, false) == OK) {
if (ml_delete(lnum) == OK) {
added--;
}
}
@@ -3835,7 +3835,7 @@ static void diffgetput(const int addr_count, const int idx_cur, const int idx_fr
// which results in inaccurate reporting of the byte count of
// previous contents in buffer-update events.
buf_empty = false;
ml_delete(2, false);
ml_delete(2);
}
}
linenr_T new_count = dp->df_count[idx_to] + added;