From: Bram Moolenaar Date: Mon, 13 Apr 2015 18:52:36 +0000 (+0200) Subject: patch 7.4.699 X-Git-Tag: v7.4.699 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=05b20fb14ec3219d73014595cfb6cc28ae1e1fc3;p=vim patch 7.4.699 Problem: E315 when trying to delete a fold. (Yutao Yuan) Solution: Make sure the fold doesn't go beyond the last buffer line. (Christian Brabandt) --- 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) diff --git a/src/version.c b/src/version.c index 4a35a90a8..9d1eb7977 100644 --- a/src/version.c +++ b/src/version.c @@ -741,6 +741,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 699, /**/ 698, /**/