diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-06-29 17:19:28 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-06-29 17:19:28 +0200 |
commit | 10315b1201716a10d39477fc09e3eb89e944191f (patch) | |
tree | f9114832df1b7d1f6c3391a571d4ba7f80c481e6 /src/ops.c | |
parent | 6b487147acc7d76754d7f041e009afbd1eeffb58 (diff) | |
download | vim-git-10315b1201716a10d39477fc09e3eb89e944191f.tar.gz |
updated for version 7.3.1270v7.3.1270
Problem: Using "Vp" in an empty buffer can't be undone. (Hauke Petersen)
Solution: Save one line in an empty buffer. (Christian Brabandt)
Diffstat (limited to 'src/ops.c')
-rw-r--r-- | src/ops.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -3497,7 +3497,9 @@ do_put(regname, dir, count, flags) #endif if (dir == FORWARD) ++lnum; - if (u_save(lnum - 1, lnum) == FAIL) + /* In an empty buffer the empty line is going to be replaced, include + * it in the saved lines. */ + if ((bufempty() ? u_save(0, 1) : u_save(lnum - 1, lnum)) == FAIL) goto end; #ifdef FEAT_FOLDING if (dir == FORWARD) |