mirror of
https://github.com/neovim/neovim.git
synced 2025-11-16 15:21:20 +00:00
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:
@@ -157,12 +157,12 @@ static int read_buffer(bool read_stdin, exarg_T *eap, int flags)
|
||||
if (retval == OK) {
|
||||
// Delete the binary lines.
|
||||
while (--line_count >= 0) {
|
||||
ml_delete(1, false);
|
||||
ml_delete(1);
|
||||
}
|
||||
} else {
|
||||
// Delete the converted lines.
|
||||
while (curbuf->b_ml.ml_line_count > line_count) {
|
||||
ml_delete(line_count, false);
|
||||
ml_delete(line_count);
|
||||
}
|
||||
}
|
||||
// Put the cursor on the first line.
|
||||
@@ -758,7 +758,7 @@ void buf_clear(void)
|
||||
linenr_T line_count = curbuf->b_ml.ml_line_count;
|
||||
extmark_free_all(curbuf); // delete any extmarks
|
||||
while (!(curbuf->b_ml.ml_flags & ML_EMPTY)) {
|
||||
ml_delete(1, false);
|
||||
ml_delete(1);
|
||||
}
|
||||
deleted_lines_mark(1, line_count); // prepare for display
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user