]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.1270 v7.3.1270
authorBram Moolenaar <Bram@vim.org>
Sat, 29 Jun 2013 15:19:28 +0000 (17:19 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 29 Jun 2013 15:19:28 +0000 (17:19 +0200)
Problem:    Using "Vp" in an empty buffer can't be undone. (Hauke Petersen)
Solution:   Save one line in an empty buffer. (Christian Brabandt)

src/ops.c
src/version.c

index 57c4b0adb22f255014c7afc1419016fb2d029160..eaad703e6a6a5f7c6be2367c6100dcb7a04553a7 100644 (file)
--- 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)
index 8022a78f38f1f7f23aba73d3c30e9b2514eaeea0..18588e8c4594d58ac96393862e4411182736fc2a 100644 (file)
@@ -728,6 +728,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1270,
 /**/
     1269,
 /**/