diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/fold.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/fold.c b/src/nvim/fold.c index 61a85171e8..2cbe43d5be 100644 --- a/src/nvim/fold.c +++ b/src/nvim/fold.c @@ -1389,6 +1389,10 @@ static void 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) |