diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-12-21 19:03:40 -0500 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-12-21 19:10:43 -0500 |
commit | 5e80b90ef46cdd316b9da9543cd6a80a92259ffb (patch) | |
tree | 630a65ae1b67439c1ec1e4338379e35814f66c0c | |
parent | aa3b17d04a81b0430dc842b904d6bb1f046ad749 (diff) | |
download | rneovim-5e80b90ef46cdd316b9da9543cd6a80a92259ffb.tar.gz rneovim-5e80b90ef46cdd316b9da9543cd6a80a92259ffb.tar.bz2 rneovim-5e80b90ef46cdd316b9da9543cd6a80a92259ffb.zip |
vim-patch:8.2.2176: crash with a sequence of fold commands
Problem: Crash with a sequence of fold commands.
Solution: Bail out when there are no folds at all. Add a test (Dominique
Pellé) (closes vim/vim#7515)
https://github.com/vim/vim/commit/6a78f328442073c32d58eafc13ce5a1ca7729eeb
N/A patches for version.c:
vim-patch:8.2.2174: Mac version doesn't specify the CPU architecture
Problem: Mac version doesn't specify the CPU architecture.
Solution: Add "arm64" or "x86_64". (Yee Cheng Chin, closes vim/vim#7519)
https://github.com/vim/vim/commit/8c9d98a8af5351a3ac98cf11dede9f0268461511
vim-patch:8.2.2175: github actions: clang-11 handling suboptimal
Problem: Github actions: clang-11 handling suboptimal.
Solution: Separate step of installing clang-11. Get ubuntu release name
dynamically. (Ozaki Kiichi, closes vim/vim#7514)
https://github.com/vim/vim/commit/9aff970204234193045cfee205d51e2393e93bfd
-rw-r--r-- | src/nvim/fold.c | 3 | ||||
-rw-r--r-- | src/nvim/testdir/test_fold.vim | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/nvim/fold.c b/src/nvim/fold.c index 654aa6d5ba..0593c16999 100644 --- a/src/nvim/fold.c +++ b/src/nvim/fold.c @@ -902,8 +902,9 @@ int foldMoveTo( bool last = false; for (;; ) { if (!foldFind(gap, curwin->w_cursor.lnum - lnum_off, &fp)) { - if (!updown) + if (!updown || gap->ga_len == 0) { break; + } /* When moving up, consider a fold above the cursor; when * moving down consider a fold below the cursor. */ diff --git a/src/nvim/testdir/test_fold.vim b/src/nvim/testdir/test_fold.vim index 3c90c45952..88ce64b9eb 100644 --- a/src/nvim/testdir/test_fold.vim +++ b/src/nvim/testdir/test_fold.vim @@ -815,4 +815,11 @@ func Test_fold_create_delete_create() bwipe! endfunc +" this was crashing +func Test_fold_create_delete() + new + norm zFzFzdzj + bwipe! +endfunc + " vim: shiftwidth=2 sts=2 expandtab |