Skip to content

Commit 5027f23

Browse files
brammooldouglaskayama
authored andcommitted
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)
1 parent d7ff57f commit 5027f23

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

src/fold.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,8 @@ hasFoldingWin(win, lnum, firstp, lastp, cache, infop)
234234
return FALSE;
235235
}
236236

237+
if (last > win->w_buffer->b_ml.ml_line_count)
238+
last = win->w_buffer->b_ml.ml_line_count;
237239
if (lastp != NULL)
238240
*lastp = last;
239241
if (firstp != NULL)

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -756,6 +756,8 @@ static char *(features[]) =
756756

757757
static int included_patches[] =
758758
{ /* Add new patch number below this line */
759+
/**/
760+
699,
759761
/**/
760762
698,
761763
/**/

0 commit comments

Comments
 (0)