]> granicus.if.org Git - vim/commitdiff
patch 7.4.699 v7.4.699
authorBram Moolenaar <Bram@vim.org>
Mon, 13 Apr 2015 18:52:36 +0000 (20:52 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 13 Apr 2015 18:52:36 +0000 (20:52 +0200)
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)

src/fold.c
src/version.c

index 41fcee0fd65c5564bca5190fdbe0883de6d9cafd..671bbf75a14f4bf4738b0b4066b2aea3fb20e86f 100644 (file)
@@ -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)
index 4a35a90a83d51ecb88a02f6fcb78bd71fe9cc3cb..9d1eb797701e80ff71a54a89e166738afeea4d4a 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    699,
 /**/
     698,
 /**/