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 654cdf82a8..ab557ecf68 100644 --- a/src/nvim/fold.c +++ b/src/nvim/fold.c @@ -241,6 +241,9 @@ hasFoldingWin ( 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) |