]> granicus.if.org Git - vim/commitdiff
patch 8.2.1092: not checking if saving for undo succeeds v8.2.1092
authorBram Moolenaar <Bram@vim.org>
Mon, 29 Jun 2020 21:02:21 +0000 (23:02 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 29 Jun 2020 21:02:21 +0000 (23:02 +0200)
Problem:    Not checking if saving for undo succeeds.
Solution:   Bail out if u_savesub() returns FAIL.

src/textprop.c
src/version.c

index 2145db262f64867fe0e6b96251ed1a3ba4740688..0645e1fd70b51dd75c37d4e1845d54a6ab6826d2 100644 (file)
@@ -1350,8 +1350,9 @@ adjust_prop_columns(
        if (res.dirty)
        {
            // Save for undo if requested and not done yet.
-           if ((flags & APC_SAVE_FOR_UNDO) && !dirty)
-               u_savesub(lnum);
+           if ((flags & APC_SAVE_FOR_UNDO) && !dirty
+                                                   && u_savesub(lnum) == FAIL)
+               return FALSE;
            dirty = TRUE;
        }
        if (res.can_drop)
index 82eb99036f7169698b4d066ce1b0749d6a0ead61..cac669e4252018eff2f33e7c32addda5c7e5cb1f 100644 (file)
@@ -754,6 +754,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1092,
 /**/
     1091,
 /**/