diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-12-21 22:30:15 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-21 22:30:15 -0500 |
commit | 7b65a9135e04aade4dd66b5f9dc33c74e5ac962a (patch) | |
tree | 348d52efa9071fe2c217a5ec9c778afbdbe4555a /src/nvim/fold.c | |
parent | aa3b17d04a81b0430dc842b904d6bb1f046ad749 (diff) | |
parent | 07425d45e6c4bc0525504e24aee0ad0864d71379 (diff) | |
download | rneovim-7b65a9135e04aade4dd66b5f9dc33c74e5ac962a.tar.gz rneovim-7b65a9135e04aade4dd66b5f9dc33c74e5ac962a.tar.bz2 rneovim-7b65a9135e04aade4dd66b5f9dc33c74e5ac962a.zip |
Merge pull request #13581 from janlazo/vim-8.2.2174
vim-patch:8.2.{2174,2175,2176,2177,2181}
Diffstat (limited to 'src/nvim/fold.c')
-rw-r--r-- | src/nvim/fold.c | 3 |
1 files changed, 2 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. */ |