commit | 07e87e9eb5e7195d47d47c0ca752b6c8372a99ea | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Mon Aug 31 21:22:40 2020 +0200 |
committer | Bram Moolenaar <Bram@vim.org> | Mon Aug 31 21:22:40 2020 +0200 |
tree | 8b084ff0bc6b53d3526ceda2b0e885456baebb55 | |
parent | 2c93c685e3334c50d9a748ad699df727a4501b08 [diff] [blame] |
patch 8.2.1554: crash in normal test Problem: Crash in normal test. Solution: Skip adjusting marks if there are no folds.
diff --git a/src/fold.c b/src/fold.c index 90fafea..3c106d2 100644 --- a/src/fold.c +++ b/src/fold.c
@@ -1515,6 +1515,9 @@ 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)