diff options
Diffstat (limited to 'src/nvim/fold.c')
-rw-r--r-- | src/nvim/fold.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/fold.c b/src/nvim/fold.c index 57001f77ed..96968a5d49 100644 --- a/src/nvim/fold.c +++ b/src/nvim/fold.c @@ -888,6 +888,9 @@ int foldMoveTo( // that moves the cursor is used. linenr_T lnum_off = 0; garray_T *gap = &curwin->w_folds; + if (gap->ga_len == 0) { + break; + } bool use_level = false; bool maybe_small = false; linenr_T lnum_found = curwin->w_cursor.lnum; |