diff options
Diffstat (limited to 'src/fold.c')
-rw-r--r-- | src/fold.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/fold.c b/src/fold.c index 41fcee0fd..671bbf75a 100644 --- a/src/fold.c +++ b/src/fold.c @@ -234,6 +234,8 @@ hasFoldingWin(win, lnum, firstp, lastp, cache, infop) return FALSE; } + if (last > win->w_buffer->b_ml.ml_line_count) + last = win->w_buffer->b_ml.ml_line_count; if (lastp != NULL) *lastp = last; if (firstp != NULL) |