From 22e9aadc887326019839b469c034d8ef148eaabc Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Tue, 1 Sep 2020 07:25:36 -0400 Subject: vim-patch:8.2.1554: crash in normal test Problem: Crash in normal test. Solution: Skip adjusting marks if there are no folds. https://github.com/vim/vim/commit/07e87e9eb5e7195d47d47c0ca752b6c8372a99ea --- src/nvim/fold.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') 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) -- cgit