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.
diff --git a/src/terminal.c b/src/terminal.c
index 59bf039..86a1a0f 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -1609,7 +1609,7 @@
{
// Delete the empty line that was in the empty buffer.
curbuf = buf;
- ml_delete(1, FALSE);
+ ml_delete(1);
curbuf = curwin->w_buffer;
}
}
@@ -1683,7 +1683,7 @@
while (curbuf->b_ml.ml_line_count > term->tl_scrollback_scrolled
&& gap->ga_len > 0)
{
- ml_delete(curbuf->b_ml.ml_line_count, FALSE);
+ ml_delete(curbuf->b_ml.ml_line_count);
line = (sb_line_T *)gap->ga_data + gap->ga_len - 1;
vim_free(line->sb_cells);
--gap->ga_len;
@@ -3142,7 +3142,7 @@
{
vim_free(((sb_line_T *)gap->ga_data + i)->sb_cells);
if (update_buffer)
- ml_delete(1, FALSE);
+ ml_delete(1);
}
curbuf = curwin->w_buffer;
@@ -5148,7 +5148,7 @@
{
buf = curbuf;
while (!(curbuf->b_ml.ml_flags & ML_EMPTY))
- ml_delete((linenr_T)1, FALSE);
+ ml_delete((linenr_T)1);
free_scrollback(curbuf->b_term);
redraw_later(NOT_VALID);
}
@@ -5183,7 +5183,7 @@
}
// Delete the empty line that was in the empty buffer.
- ml_delete(1, FALSE);
+ ml_delete(1);
// For term_dumpload() we are done here.
if (!do_diff)
@@ -5374,7 +5374,7 @@
if (p == NULL)
return OK;
ml_append(bot_start, p, 0, FALSE);
- ml_delete(1, FALSE);
+ ml_delete(1);
vim_free(p);
}
@@ -5384,7 +5384,7 @@
p = vim_strsave(ml_get(bot_start + lnum));
if (p == NULL)
return OK;
- ml_delete(bot_start + lnum, FALSE);
+ ml_delete(bot_start + lnum);
ml_append(lnum - 1, p, 0, FALSE);
vim_free(p);
}
@@ -5394,14 +5394,14 @@
if (p == NULL)
return OK;
ml_append(line_count - top_rows - 1, p, 0, FALSE);
- ml_delete(bot_rows + 1, FALSE);
+ ml_delete(bot_rows + 1);
vim_free(p);
// move bottom title to top
p = vim_strsave(ml_get(line_count - top_rows));
if (p == NULL)
return OK;
- ml_delete(line_count - top_rows, FALSE);
+ ml_delete(line_count - top_rows);
ml_append(bot_rows, p, 0, FALSE);
vim_free(p);