0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

Make joining a range of lines much faster. (Milan Vancura)

This commit is contained in:
Bram Moolenaar
2010-07-10 17:51:46 +02:00
parent 622925875c
commit 893eaab41f
6 changed files with 134 additions and 141 deletions

View File

@@ -8366,9 +8366,7 @@ ins_del()
{
temp = curwin->w_cursor.col;
if (!can_bs(BS_EOL) /* only if "eol" included */
|| u_save((linenr_T)(curwin->w_cursor.lnum - 1),
(linenr_T)(curwin->w_cursor.lnum + 2)) == FAIL
|| do_join(FALSE) == FAIL)
|| do_join(2, FALSE, TRUE) == FAIL)
vim_beep();
else
curwin->w_cursor.col = temp;
@@ -8549,7 +8547,7 @@ ins_bs(c, mode, inserted_space_p)
ptr[len - 1] = NUL;
}
(void)do_join(FALSE);
(void)do_join(2, FALSE, FALSE);
if (temp == NUL && gchar_cursor() != NUL)
inc_cursor();
}