changeset 6753:c1aa837853ea v7.4.699

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)
author Bram Moolenaar <bram@vim.org>
date Mon, 13 Apr 2015 20:52:36 +0200
parents db79757f8513
children a0651f2537f5
files src/fold.c src/version.c
diffstat 2 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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)
--- 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,