0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

updated for version 7.0c03

This commit is contained in:
Bram Moolenaar
2006-03-29 21:06:37 +00:00
parent d2cec5b043
commit 86ca6e3b8c
3 changed files with 19 additions and 2 deletions

View File

@@ -8993,7 +8993,17 @@ nv_put(cap)
/* When all lines were selected and deleted do_put() leaves an empty
* 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);
/* If the cursor was in that line, move it to the end of the last
* line. */
if (curwin->w_cursor.lnum > curbuf->b_ml.ml_line_count)
{
curwin->w_cursor.lnum = curbuf->b_ml.ml_line_count;
coladvance((colnr_T)MAXCOL);
}
}
#endif
auto_format(FALSE, TRUE);
}