Patch 8.2.0853
Problem: ml_delete() often called with FALSE argument.
Solution: Use ml_delete_flags(x, ML_DEL_MESSAGE) when argument is TRUE.
Files: src/buffer.c, src/change.c, src/diff.c, src/evalbuffer.c,
src/ex_cmds.c, src/ex_docmd.c, src/fileio.c, src/if_lua.c,
src/if_mzsch.c, src/if_ruby.c, src/if_tcl.c, src/normal.c,
src/popupmenu.c, src/popupwin.c, src/quickfix.c, src/spell.c,
src/terminal.c, src/if_perl.xs, src/if_py_both.h, src/memline.c,
src/proto/memline.pro
*** ../vim-8.2.0852/src/buffer.c 2020-04-06 22:12:57.137652853 +0200
--- src/buffer.c 2020-05-30 20:06:35.675161282 +0200
***************
*** 103,115 ****
{
// Delete the binary lines.
while (--line_count >= 0)
! ml_delete((linenr_T)1, FALSE);
}
else
{
// Delete the converted lines.
while (curbuf->b_ml.ml_line_count > line_count)
! ml_delete(line_count, FALSE);
}
// Put the cursor on the first line.
curwin->w_cursor.lnum = 1;
--- 103,115 ----
{
// Delete the binary lines.
while (--line_count >= 0)
! ml_delete((linenr_T)1);
}
else
{
// Delete the converted lines.
while (curbuf->b_ml.ml_line_count > line_count)
! ml_delete(line_count);
}
// Put the cursor on the first line.
curwin->w_cursor.lnum = 1;
*** ../vim-8.2.0852/src/change.c 2020-04-30 22:29:36.622024155 +0200
--- src/change.c 2020-05-30 20:07:30.438952327 +0200
***************
*** 2317,2323 ****
if (curbuf->b_ml.ml_flags & ML_EMPTY) // nothing to delete
break;
! ml_delete(first, TRUE);
++n;
// If we delete the last line in the file, stop
--- 2317,2323 ----
if (curbuf->b_ml.ml_flags & ML_EMPTY) // nothing to delete
break;
! ml_delete_flags(first, ML_DEL_MESSAGE);
++n;
// If we delete the last line in the file, stop
*** ../vim-8.2.0852/src/diff.c 2020-04-12 19:37:13.506297291 +0200
--- src/diff.c 2020-05-30 20:07:45.178896078 +0200
***************
*** 2764,2770 ****
{
// remember deleting the last line of the buffer
buf_empty = curbuf->b_ml.ml_line_count == 1;
! ml_delete(lnum, FALSE);
--added;
}
for (i = 0; i < dp->df_count[idx_from] - start_skip - end_skip; ++i)
--- 2764,2770 ----
{
// remember deleting the last line of the buffer
buf_empty = curbuf->b_ml.ml_line_count == 1;
! ml_delete(lnum);
--added;
}
for (i = 0; i < dp->df_count[idx_from] - start_skip - end_skip; ++i)
***************
*** 2786,2792 ****
// Added the first line into an empty buffer, need to
// delete the dummy empty line.
buf_empty = FALSE;
! ml_delete((linenr_T)2, FALSE);
}
}
}
--- 2786,2792 ----
// Added the first line into an empty buffer, need to
// delete the dummy empty line.
buf_empty = FALSE;
! ml_delete((linenr_T)2);
}
}
}
*** ../vim-8.2.0852/src/evalbuffer.c 2020-05-13 22:44:18.138288820 +0200
--- src/evalbuffer.c 2020-05-30 20:08:02.886828507 +0200
***************
*** 513,519 ****
}
for (lnum = first; lnum <= last; ++lnum)
! ml_delete(first, TRUE);
FOR_ALL_TAB_WINDOWS(tp, wp)
if (wp->w_buffer == buf)
--- 513,519 ----
}
for (lnum = first; lnum <= last; ++lnum)
! ml_delete_flags(first, ML_DEL_MESSAGE);
FOR_ALL_TAB_WINDOWS(tp, wp)
if (wp->w_buffer == buf)
*** ../vim-8.2.0852/src/ex_cmds.c 2020-05-27 23:15:12.846004351 +0200
--- src/ex_cmds.c 2020-05-30 20:09:10.314571269 +0200
***************
*** 633,639 ****
// delete the original lines if appending worked
if (i == count)
for (i = 0; i < count; ++i)
! ml_delete(eap->line1, FALSE);
else
count = 0;
--- 633,639 ----
// delete the original lines if appending worked
if (i == count)
for (i = 0; i < count; ++i)
! ml_delete(eap->line1);
else
count = 0;
***************
*** 779,785 ****
return FAIL;
for (l = line1; l <= line2; l++)
! ml_delete(line1 + extra, TRUE);
if (!global_busy && num_lines > p_report)
smsg(NGETTEXT("%ld line moved", "%ld lines moved", num_lines),
--- 779,785 ----
return FAIL;
for (l = line1; l <= line2; l++)
! 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,3286 ****
if (empty)
{
! ml_delete(2L, FALSE);
empty = FALSE;
}
}
--- 3280,3286 ----
if (empty)
{
! ml_delete(2L);
empty = FALSE;
}
}
***************
*** 3331,3337 ****
{
if (curbuf->b_ml.ml_flags & ML_EMPTY) // nothing to delete
break;
! ml_delete(eap->line1, FALSE);
}
// make sure the cursor is not beyond the end of the file now
--- 3331,3337 ----
{
if (curbuf->b_ml.ml_flags & ML_EMPTY) // nothing to delete
break;
! ml_delete(eap->line1);
}
// make sure the cursor is not beyond the end of the file now
***************
*** 4531,4537 ****
if (u_savedel(lnum, nmatch_tl) != OK)
break;
for (i = 0; i < nmatch_tl; ++i)
! ml_delete(lnum, (int)FALSE);
mark_adjust(lnum, lnum + nmatch_tl - 1,
(long)MAXLNUM, -nmatch_tl);
if (subflags.do_ask)
--- 4531,4537 ----
if (u_savedel(lnum, nmatch_tl) != OK)
break;
for (i = 0; i < nmatch_tl; ++i)
! ml_delete(lnum);
mark_adjust(lnum, lnum + nmatch_tl - 1,
(long)MAXLNUM, -nmatch_tl);
if (subflags.do_ask)
*** ../vim-8.2.0852/src/ex_docmd.c 2020-05-29 23:03:06.060851731 +0200
--- src/ex_docmd.c 2020-05-30 20:09:23.110513452 +0200
***************
*** 6557,6563 ****
lnum = 1;
if (*ml_get(lnum) == NUL && u_savedel(lnum, 1L) == OK)
{
! ml_delete(lnum, FALSE);
if (curwin->w_cursor.lnum > 1
&& curwin->w_cursor.lnum >= lnum)
--curwin->w_cursor.lnum;
--- 6557,6563 ----
lnum = 1;
if (*ml_get(lnum) == NUL && u_savedel(lnum, 1L) == OK)
{
! ml_delete(lnum);
if (curwin->w_cursor.lnum > 1
&& curwin->w_cursor.lnum >= lnum)
--curwin->w_cursor.lnum;
*** ../vim-8.2.0852/src/fileio.c 2020-05-07 18:37:00.128512594 +0200
--- src/fileio.c 2020-05-30 20:09:43.822405007 +0200
***************
*** 862,868 ****
}
// Delete the previously read lines.
while (lnum > from)
! ml_delete(lnum--, FALSE);
file_rewind = FALSE;
if (set_options)
{
--- 862,868 ----
}
// Delete the previously read lines.
while (lnum > from)
! ml_delete(lnum--);
file_rewind = FALSE;
if (set_options)
{
***************
*** 2292,2298 ****
#ifdef FEAT_NETBEANS_INTG
netbeansFireChanges = 0;
#endif
! ml_delete(curbuf->b_ml.ml_line_count, FALSE);
#ifdef FEAT_NETBEANS_INTG
netbeansFireChanges = 1;
#endif
--- 2292,2298 ----
#ifdef FEAT_NETBEANS_INTG
netbeansFireChanges = 0;
#endif
! ml_delete(curbuf->b_ml.ml_line_count);
#ifdef FEAT_NETBEANS_INTG
netbeansFireChanges = 1;
#endif
***************
*** 3933,3939 ****
{
curbuf = frombuf;
for (lnum = curbuf->b_ml.ml_line_count; lnum > 0; --lnum)
! if (ml_delete(lnum, FALSE) == FAIL)
{
// Oops! We could try putting back the saved lines, but that
// might fail again...
--- 3933,3939 ----
{
curbuf = frombuf;
for (lnum = curbuf->b_ml.ml_line_count; lnum > 0; --lnum)
! if (ml_delete(lnum) == FAIL)
{
// Oops! We could try putting back the saved lines, but that
// might fail again...
***************
*** 4329,4335 ****
// Put the text back from the save buffer. First
// delete any lines that readfile() added.
while (!BUFEMPTY())
! if (ml_delete(buf->b_ml.ml_line_count, FALSE) == FAIL)
break;
(void)move_lines(savebuf, buf);
}
--- 4329,4335 ----
// Put the text back from the save buffer. First
// delete any lines that readfile() added.
while (!BUFEMPTY())
! if (ml_delete(buf->b_ml.ml_line_count) == FAIL)
break;
(void)move_lines(savebuf, buf);
}
*** ../vim-8.2.0852/src/if_lua.c 2020-05-17 18:53:22.104931177 +0200
--- src/if_lua.c 2020-05-30 20:09:56.974336701 +0200
***************
*** 1341,1347 ****
curbuf = buf;
luaL_error(L, "cannot save undo information");
}
! else if (ml_delete(n, FALSE) == FAIL)
{
curbuf = buf;
luaL_error(L, "cannot delete line");
--- 1341,1347 ----
curbuf = buf;
luaL_error(L, "cannot save undo information");
}
! else if (ml_delete(n) == FAIL)
{
curbuf = buf;
luaL_error(L, "cannot delete line");
*** ../vim-8.2.0852/src/if_mzsch.c 2020-04-12 19:37:13.514297270 +0200
--- src/if_mzsch.c 2020-05-30 20:10:16.674235122 +0200
***************
*** 2468,2474 ****
curbuf = savebuf;
raise_vim_exn(_("cannot save undo information"));
}
! else if (ml_delete((linenr_T)n, FALSE) == FAIL)
{
curbuf = savebuf;
raise_vim_exn(_("cannot delete line"));
--- 2468,2474 ----
curbuf = savebuf;
raise_vim_exn(_("cannot save undo information"));
}
! else if (ml_delete((linenr_T)n) == FAIL)
{
curbuf = savebuf;
raise_vim_exn(_("cannot delete line"));
***************
*** 2597,2603 ****
else
{
for (i = 0; i < old_len; i++)
! if (ml_delete((linenr_T)lo, FALSE) == FAIL)
{
curbuf = savebuf;
raise_vim_exn(_("cannot delete line"));
--- 2597,2603 ----
else
{
for (i = 0; i < old_len; i++)
! if (ml_delete((linenr_T)lo) == FAIL)
{
curbuf = savebuf;
raise_vim_exn(_("cannot delete line"));
***************
*** 2665,2671 ****
*/
for (i = 0; i < old_len - new_len; ++i)
{
! if (ml_delete((linenr_T)lo, FALSE) == FAIL)
{
curbuf = savebuf;
free_array(array);
--- 2665,2671 ----
*/
for (i = 0; i < old_len - new_len; ++i)
{
! if (ml_delete((linenr_T)lo) == FAIL)
{
curbuf = savebuf;
free_array(array);
*** ../vim-8.2.0852/src/if_ruby.c 2020-05-26 20:09:06.910102525 +0200
--- src/if_ruby.c 2020-05-30 20:10:28.750173297 +0200
***************
*** 1442,1448 ****
if (u_savedel(n, 1) == OK)
{
! ml_delete(n, 0);
// Changes to non-active buffers should properly refresh
// SegPhault - 01/09/05
--- 1442,1448 ----
if (u_savedel(n, 1) == OK)
{
! ml_delete(n);
// Changes to non-active buffers should properly refresh
// SegPhault - 01/09/05
*** ../vim-8.2.0852/src/if_tcl.c 2020-05-11 23:13:56.929111324 +0200
--- src/if_tcl.c 2020-05-30 20:12:12.913652128 +0200
***************
*** 735,741 ****
i = n;
do
{
! if (ml_delete((linenr_T)i, FALSE) != OK)
goto setListError;
++n;
} while (n <= val2);
--- 735,741 ----
i = n;
do
{
! if (ml_delete((linenr_T)i) != OK)
goto setListError;
++n;
} while (n <= val2);
***************
*** 783,789 ****
}
for (i = 0; i < n; i++)
{
! ml_delete((linenr_T)val1, FALSE);
err = vimerror(interp);
if (err != TCL_OK)
break;
--- 783,789 ----
}
for (i = 0; i < n; i++)
{
! ml_delete((linenr_T)val1);
err = vimerror(interp);
if (err != TCL_OK)
break;
*** ../vim-8.2.0852/src/normal.c 2020-05-30 18:14:37.828521058 +0200
--- src/normal.c 2020-05-30 20:12:47.997481290 +0200
***************
*** 7413,7419 ****
// line that needs to be deleted now.
if (empty && *ml_get(curbuf->b_ml.ml_line_count) == NUL)
{
! ml_delete(curbuf->b_ml.ml_line_count, TRUE);
deleted_lines(curbuf->b_ml.ml_line_count + 1, 1);
// If the cursor was in that line, move it to the end of the last
--- 7413,7419 ----
// line that needs to be deleted now.
if (empty && *ml_get(curbuf->b_ml.ml_line_count) == NUL)
{
! ml_delete_flags(curbuf->b_ml.ml_line_count, ML_DEL_MESSAGE);
deleted_lines(curbuf->b_ml.ml_line_count + 1, 1);
// If the cursor was in that line, move it to the end of the last
*** ../vim-8.2.0852/src/popupmenu.c 2020-05-13 22:44:18.142288807 +0200
--- src/popupmenu.c 2020-05-30 20:13:04.673400832 +0200
***************
*** 817,823 ****
{
// Already a "wipeout" buffer, make it empty.
while (!BUFEMPTY())
! ml_delete((linenr_T)1, FALSE);
}
else
{
--- 817,823 ----
{
// Already a "wipeout" buffer, make it empty.
while (!BUFEMPTY())
! ml_delete((linenr_T)1);
}
else
{
***************
*** 860,866 ****
}
}
// delete the empty last line
! ml_delete(curbuf->b_ml.ml_line_count, FALSE);
// Increase the height of the preview window to show the
// text, but no more than 'previewheight' lines.
--- 860,866 ----
}
}
// delete the empty last line
! ml_delete(curbuf->b_ml.ml_line_count);
// Increase the height of the preview window to show the
// text, but no more than 'previewheight' lines.
*** ../vim-8.2.0852/src/popupwin.c 2020-05-18 20:12:05.810157467 +0200
--- src/popupwin.c 2020-05-30 20:13:18.933332420 +0200
***************
*** 1537,1543 ****
// Clear the buffer, then replace the lines.
curbuf = buf;
for (lnum = buf->b_ml.ml_line_count; lnum > 0; --lnum)
! ml_delete(lnum, FALSE);
curbuf = curwin->w_buffer;
// Add text to the buffer.
--- 1537,1543 ----
// Clear the buffer, then replace the lines.
curbuf = buf;
for (lnum = buf->b_ml.ml_line_count; lnum > 0; --lnum)
! ml_delete(lnum);
curbuf = curwin->w_buffer;
// Add text to the buffer.
***************
*** 1563,1569 ****
// delete the line that was in the empty buffer
curbuf = buf;
! ml_delete(buf->b_ml.ml_line_count, FALSE);
curbuf = curwin->w_buffer;
}
--- 1563,1569 ----
// delete the line that was in the empty buffer
curbuf = buf;
! ml_delete(buf->b_ml.ml_line_count);
curbuf = curwin->w_buffer;
}
*** ../vim-8.2.0852/src/quickfix.c 2020-04-12 19:37:13.522297249 +0200
--- src/quickfix.c 2020-05-30 20:13:35.441253602 +0200
***************
*** 4499,4505 ****
// delete all existing lines
while ((curbuf->b_ml.ml_flags & ML_EMPTY) == 0)
! (void)ml_delete((linenr_T)1, FALSE);
}
// Check if there is anything to display
--- 4499,4505 ----
// delete all existing lines
while ((curbuf->b_ml.ml_flags & ML_EMPTY) == 0)
! (void)ml_delete((linenr_T)1);
}
// Check if there is anything to display
***************
*** 4533,4539 ****
if (old_last == NULL)
// Delete the empty line which is now at the end
! (void)ml_delete(lnum + 1, FALSE);
}
// correct cursor position
--- 4533,4539 ----
if (old_last == NULL)
// Delete the empty line which is now at the end
! (void)ml_delete(lnum + 1);
}
// correct cursor position
*** ../vim-8.2.0852/src/spell.c 2020-04-12 19:37:13.522297249 +0200
--- src/spell.c 2020-05-30 20:13:51.233178622 +0200
***************
*** 3810,3816 ****
// Delete the empty line that we started with.
if (curbuf->b_ml.ml_line_count > 1)
! ml_delete(curbuf->b_ml.ml_line_count, FALSE);
redraw_later(NOT_VALID);
}
--- 3810,3816 ----
// Delete the empty line that we started with.
if (curbuf->b_ml.ml_line_count > 1)
! ml_delete(curbuf->b_ml.ml_line_count);
redraw_later(NOT_VALID);
}
*** ../vim-8.2.0852/src/terminal.c 2020-05-29 22:41:36.929691032 +0200
--- src/terminal.c 2020-05-30 20:14:23.961024409 +0200
***************
*** 1609,1615 ****
{
// Delete the empty line that was in the empty buffer.
curbuf = buf;
! ml_delete(1, FALSE);
curbuf = curwin->w_buffer;
}
}
--- 1609,1615 ----
{
// Delete the empty line that was in the empty buffer.
curbuf = buf;
! ml_delete(1);
curbuf = curwin->w_buffer;
}
}
***************
*** 1683,1689 ****
while (curbuf->b_ml.ml_line_count > term->tl_scrollback_scrolled
&& gap->ga_len > 0)
{
! ml_delete(curbuf->b_ml.ml_line_count, FALSE);
line = (sb_line_T *)gap->ga_data + gap->ga_len - 1;
vim_free(line->sb_cells);
--gap->ga_len;
--- 1683,1689 ----
while (curbuf->b_ml.ml_line_count > term->tl_scrollback_scrolled
&& gap->ga_len > 0)
{
! 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,3148 ****
{
vim_free(((sb_line_T *)gap->ga_data + i)->sb_cells);
if (update_buffer)
! ml_delete(1, FALSE);
}
curbuf = curwin->w_buffer;
--- 3142,3148 ----
{
vim_free(((sb_line_T *)gap->ga_data + i)->sb_cells);
if (update_buffer)
! ml_delete(1);
}
curbuf = curwin->w_buffer;
***************
*** 5148,5154 ****
{
buf = curbuf;
while (!(curbuf->b_ml.ml_flags & ML_EMPTY))
! ml_delete((linenr_T)1, FALSE);
free_scrollback(curbuf->b_term);
redraw_later(NOT_VALID);
}
--- 5148,5154 ----
{
buf = curbuf;
while (!(curbuf->b_ml.ml_flags & ML_EMPTY))
! ml_delete((linenr_T)1);
free_scrollback(curbuf->b_term);
redraw_later(NOT_VALID);
}
***************
*** 5183,5189 ****
}
// Delete the empty line that was in the empty buffer.
! ml_delete(1, FALSE);
// For term_dumpload() we are done here.
if (!do_diff)
--- 5183,5189 ----
}
// Delete the empty line that was in the empty buffer.
! ml_delete(1);
// For term_dumpload() we are done here.
if (!do_diff)
***************
*** 5374,5380 ****
if (p == NULL)
return OK;
ml_append(bot_start, p, 0, FALSE);
! ml_delete(1, FALSE);
vim_free(p);
}
--- 5374,5380 ----
if (p == NULL)
return OK;
ml_append(bot_start, p, 0, FALSE);
! ml_delete(1);
vim_free(p);
}
***************
*** 5384,5390 ****
p = vim_strsave(ml_get(bot_start + lnum));
if (p == NULL)
return OK;
! ml_delete(bot_start + lnum, FALSE);
ml_append(lnum - 1, p, 0, FALSE);
vim_free(p);
}
--- 5384,5390 ----
p = vim_strsave(ml_get(bot_start + lnum));
if (p == NULL)
return OK;
! ml_delete(bot_start + lnum);
ml_append(lnum - 1, p, 0, FALSE);
vim_free(p);
}
***************
*** 5394,5407 ****
if (p == NULL)
return OK;
ml_append(line_count - top_rows - 1, p, 0, FALSE);
! ml_delete(bot_rows + 1, FALSE);
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_append(bot_rows, p, 0, FALSE);
vim_free(p);
--- 5394,5407 ----
if (p == NULL)
return OK;
ml_append(line_count - top_rows - 1, p, 0, 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);
ml_append(bot_rows, p, 0, FALSE);
vim_free(p);
*** ../vim-8.2.0852/src/if_perl.xs 2020-04-11 18:01:10.933802350 +0200
--- src/if_perl.xs 2020-05-30 20:14:42.348938404 +0200
***************
*** 1067,1073 ****
}
else
{
! ml_delete(*line, FALSE);
deleted_lines_mark(*line, 1L);
--(*end);
--(*line);
--- 1067,1073 ----
}
else
{
! ml_delete(*line);
deleted_lines_mark(*line, 1L);
--(*end);
--(*line);
***************
*** 1862,1868 ****
if (u_savedel(lnum, 1) == OK)
{
! ml_delete(lnum, 0);
check_cursor();
deleted_lines_mark(lnum, 1L);
}
--- 1862,1868 ----
if (u_savedel(lnum, 1) == OK)
{
! ml_delete(lnum);
check_cursor();
deleted_lines_mark(lnum, 1L);
}
*** ../vim-8.2.0852/src/if_py_both.h 2020-05-13 22:44:18.142288807 +0200
--- src/if_py_both.h 2020-05-30 20:14:59.348859268 +0200
***************
*** 4399,4405 ****
if (u_savedel((linenr_T)n, 1L) == FAIL)
RAISE_UNDO_FAIL;
! else if (ml_delete((linenr_T)n, FALSE) == FAIL)
RAISE_DELETE_LINE_FAIL;
else
{
--- 4399,4405 ----
if (u_savedel((linenr_T)n, 1L) == FAIL)
RAISE_UNDO_FAIL;
! else if (ml_delete((linenr_T)n) == FAIL)
RAISE_DELETE_LINE_FAIL;
else
{
***************
*** 4512,4518 ****
{
for (i = 0; i < n; ++i)
{
! if (ml_delete((linenr_T)lo, FALSE) == FAIL)
{
RAISE_DELETE_LINE_FAIL;
break;
--- 4512,4518 ----
{
for (i = 0; i < n; ++i)
{
! if (ml_delete((linenr_T)lo) == FAIL)
{
RAISE_DELETE_LINE_FAIL;
break;
***************
*** 4588,4594 ****
if (!PyErr_Occurred())
{
for (i = 0; i < old_len - new_len; ++i)
! if (ml_delete((linenr_T)lo, FALSE) == FAIL)
{
RAISE_DELETE_LINE_FAIL;
break;
--- 4588,4594 ----
if (!PyErr_Occurred())
{
for (i = 0; i < old_len - new_len; ++i)
! if (ml_delete((linenr_T)lo) == FAIL)
{
RAISE_DELETE_LINE_FAIL;
break;
*** ../vim-8.2.0852/src/memline.c 2020-05-30 15:31:57.854700879 +0200
--- src/memline.c 2020-05-30 20:12:29.657570327 +0200
***************
*** 1386,1392 ****
* contents of the current buffer.
*/
while (!(curbuf->b_ml.ml_flags & ML_EMPTY))
! ml_delete((linenr_T)1, FALSE);
/*
* Try reading the original file to obtain the values of 'fileformat',
--- 1386,1392 ----
* contents of the current buffer.
*/
while (!(curbuf->b_ml.ml_flags & ML_EMPTY))
! ml_delete((linenr_T)1);
/*
* Try reading the original file to obtain the values of 'fileformat',
***************
*** 1664,1670 ****
*/
while (curbuf->b_ml.ml_line_count > lnum
&& !(curbuf->b_ml.ml_flags & ML_EMPTY))
! ml_delete(curbuf->b_ml.ml_line_count, FALSE);
curbuf->b_flags |= BF_RECOVERED;
recoverymode = FALSE;
--- 1664,1670 ----
*/
while (curbuf->b_ml.ml_line_count > lnum
&& !(curbuf->b_ml.ml_flags & ML_EMPTY))
! ml_delete(curbuf->b_ml.ml_line_count);
curbuf->b_flags |= BF_RECOVERED;
recoverymode = FALSE;
***************
*** 3705,3713 ****
* return FAIL for failure, OK otherwise
*/
int
! ml_delete(linenr_T lnum, int message)
{
! return ml_delete_flags(lnum, message ? ML_DEL_MESSAGE : 0);
}
/*
--- 3705,3713 ----
* return FAIL for failure, OK otherwise
*/
int
! ml_delete(linenr_T lnum)
{
! return ml_delete_flags(lnum, 0);
}
/*
*** ../vim-8.2.0852/src/proto/memline.pro 2020-05-30 14:46:48.861163777
+0200
--- src/proto/memline.pro 2020-05-30 20:15:05.412831102 +0200
***************
*** 26,32 ****
int ml_append_buf(buf_T *buf, linenr_T lnum, char_u *line, colnr_T len, int
newfile);
int ml_replace(linenr_T lnum, char_u *line, int copy);
int ml_replace_len(linenr_T lnum, char_u *line_arg, colnr_T len_arg, int
has_props, int copy);
! int ml_delete(linenr_T lnum, int message);
int ml_delete_flags(linenr_T lnum, int flags);
void ml_setmarked(linenr_T lnum);
linenr_T ml_firstmarked(void);
--- 26,32 ----
int ml_append_buf(buf_T *buf, linenr_T lnum, char_u *line, colnr_T len, int
newfile);
int ml_replace(linenr_T lnum, char_u *line, int copy);
int ml_replace_len(linenr_T lnum, char_u *line_arg, colnr_T len_arg, int
has_props, int copy);
! int ml_delete(linenr_T lnum);
int ml_delete_flags(linenr_T lnum, int flags);
void ml_setmarked(linenr_T lnum);
linenr_T ml_firstmarked(void);
*** ../vim-8.2.0852/src/version.c 2020-05-30 20:04:58.119533545 +0200
--- src/version.c 2020-05-30 20:16:14.148515118 +0200
***************
*** 748,749 ****
--- 748,751 ----
{ /* Add new patch number below this line */
+ /**/
+ 853,
/**/
--
How do I set the laser printer to stun?
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202005301831.04UIVIk8426134%40masaka.moolenaar.net.