# HG changeset patch # User Bram Moolenaar # Date 1372519168 -7200 # Node ID 35b6fc57a2868b235284d914820da0815e62d54b # Parent a966933f3b6873450ab4898cc12af1b614ea1a08 updated for version 7.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) diff --git a/src/ops.c b/src/ops.c --- 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 --- 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,