diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-11-11 23:08:44 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-11 23:08:44 -0500 |
commit | 4ae31c46f75aef7d7a80dd2a8d269c168806a1bd (patch) | |
tree | 9fdd49c550b3d1d6a6bf7b6d17be607f21f9fb62 /src/nvim/fold.c | |
parent | 4875db2e56b395f47e3b9634b8c0a0e179fbe353 (diff) | |
parent | 6d58f1eacef4be410c424f5f0e23c20ffdd791be (diff) | |
download | rneovim-4ae31c46f75aef7d7a80dd2a8d269c168806a1bd.tar.gz rneovim-4ae31c46f75aef7d7a80dd2a8d269c168806a1bd.tar.bz2 rneovim-4ae31c46f75aef7d7a80dd2a8d269c168806a1bd.zip |
Merge pull request #13273 from janlazo/vim-8.2.1972
vim-patch:8.2.{1972,1973,1974}
Diffstat (limited to 'src/nvim/fold.c')
-rw-r--r-- | src/nvim/fold.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nvim/fold.c b/src/nvim/fold.c index 96968a5d49..24a73a5b9f 100644 --- a/src/nvim/fold.c +++ b/src/nvim/fold.c @@ -616,7 +616,11 @@ void foldCreate(win_T *wp, pos_T start, pos_T end) break; } } - i = (int)(fp - (fold_T *)gap->ga_data); + if (gap->ga_len == 0) { + i = 0; + } else { + i = (int)(fp - (fold_T *)gap->ga_data); + } } ga_grow(gap, 1); |