summaryrefslogtreecommitdiff
path: root/src/fold.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fold.c')
-rw-r--r--src/fold.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fold.c b/src/fold.c
index 82ce7e707..f889f4c74 100644
--- a/src/fold.c
+++ b/src/fold.c
@@ -916,7 +916,7 @@ foldMoveTo(
{
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