summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <bram@vim.org>2013-06-29 17:19:28 +0200
committerBram Moolenaar <bram@vim.org>2013-06-29 17:19:28 +0200
commitb2fea4bfd78b8ffe18bba4ac83771f84c03000d9 (patch)
treef91298fb56698fefa6abf213000792f332066627
parentf53500b7bcb65a42237d8afb52d6a200172d5502 (diff)
downloadvim-b2fea4bfd78b8ffe18bba4ac83771f84c03000d9.tar.gz
updated for version 7.3.1270v7.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)
-rw-r--r--src/ops.c4
-rw-r--r--src/version.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/ops.c b/src/ops.c
index 57c4b0ad..eaad703e 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -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)
diff --git a/src/version.c b/src/version.c
index 8022a78f..18588e8c 100644
--- a/src/version.c
+++ b/src/version.c
@@ -729,6 +729,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1270,
+/**/
1269,
/**/
1268,