diff options
author | Bram Moolenaar <Bram@vim.org> | 2006-03-29 21:06:37 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2006-03-29 21:06:37 +0000 |
commit | 86ca6e3b8c9c5d909421eb5abc2d81e02d402b49 (patch) | |
tree | 096fc5982ac2ebf110d35e8a4044d74279d19635 /src/normal.c | |
parent | d2cec5b043361ee798a0522244135f4ea87838f6 (diff) | |
download | vim-git-86ca6e3b8c9c5d909421eb5abc2d81e02d402b49.tar.gz |
updated for version 7.0c03
Diffstat (limited to 'src/normal.c')
-rw-r--r-- | src/normal.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/normal.c b/src/normal.c index 3a336d5e1..57591f7ed 100644 --- a/src/normal.c +++ b/src/normal.c @@ -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); } |