# HG changeset patch # User Bram Moolenaar # Date 1428951156 -7200 # Node ID c1aa837853ea140e1ba5b0eaeb4ae3f424e2e325 # Parent db79757f851380c6fdf9817c625a35a59ad414a0 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 --- a/src/fold.c +++ b/src/fold.c @@ -234,6 +234,8 @@ hasFoldingWin(win, lnum, firstp, lastp, 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 --- a/src/version.c +++ b/src/version.c @@ -742,6 +742,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 699, +/**/ 698, /**/ 697,