diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-09-01 07:25:36 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-09-02 08:57:43 -0400 |
commit | 22e9aadc887326019839b469c034d8ef148eaabc (patch) | |
tree | 0258d46decc870fda4a68ba2cb07fb7924dd2f5c /src | |
parent | 948e625e1ecbdb1d4771e1481b3d6534b21250c9 (diff) | |
download | rneovim-22e9aadc887326019839b469c034d8ef148eaabc.tar.gz rneovim-22e9aadc887326019839b469c034d8ef148eaabc.tar.bz2 rneovim-22e9aadc887326019839b469c034d8ef148eaabc.zip |
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
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) |