summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-08-31 21:22:40 +0200
committerBram Moolenaar <Bram@vim.org>2020-08-31 21:22:40 +0200
commit07e87e9eb5e7195d47d47c0ca752b6c8372a99ea (patch)
tree8b084ff0bc6b53d3526ceda2b0e885456baebb55
parent2c93c685e3334c50d9a748ad699df727a4501b08 (diff)
downloadvim-git-07e87e9eb5e7195d47d47c0ca752b6c8372a99ea.tar.gz
patch 8.2.1554: crash in normal testv8.2.1554
Problem: Crash in normal test. Solution: Skip adjusting marks if there are no folds.
-rw-r--r--src/fold.c3
-rw-r--r--src/version.c2
2 files changed, 5 insertions, 0 deletions
diff --git a/src/fold.c b/src/fold.c
index 90fafea63..3c106d25c 100644
--- a/src/fold.c
+++ b/src/fold.c
@@ -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)
diff --git a/src/version.c b/src/version.c
index 8155ffccb..92c533c88 100644
--- a/src/version.c
+++ b/src/version.c
@@ -755,6 +755,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1554,
+/**/
1553,
/**/
1552,