]> granicus.if.org Git - vim/commitdiff
patch 8.2.1554: crash in normal test v8.2.1554
authorBram Moolenaar <Bram@vim.org>
Mon, 31 Aug 2020 19:22:40 +0000 (21:22 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 31 Aug 2020 19:22:40 +0000 (21:22 +0200)
Problem:    Crash in normal test.
Solution:   Skip adjusting marks if there are no folds.

src/fold.c
src/version.c

index 90fafea6366251e29be514fdf2284e390e7847ad..3c106d25cfb342e0e30366248e9b4a647d486332 100644 (file)
@@ -1515,6 +1515,9 @@ foldMarkAdjustRecurse(
     linenr_T   last;
     linenr_T   top;
 
+    if (gap->ga_len == 0)
+       return;
+
     // In Insert mode an inserted line at the top of a fold is considered part
     // of the fold, otherwise it isn't.
     if ((State & INSERT) && amount == (linenr_T)1 && line2 == MAXLNUM)
index 8155ffccb9886b02d98e0ee3a6cf49109aed7111..92c533c88373cf95506213aa6b959b11a206fadf 100644 (file)
@@ -754,6 +754,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1554,
 /**/
     1553,
 /**/