From dd8531dbb5042241d20f11ca97436d6d8249c087 Mon Sep 17 00:00:00 2001 From: grtlr Date: Sat, 25 Apr 2015 19:00:25 +0200 Subject: vim-patch:7.4.699 #2508 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) https://code.google.com/p/vim/source/detail?r=v7-4-699 --- src/nvim/fold.c | 3 +++ src/nvim/version.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/nvim/fold.c b/src/nvim/fold.c index 654cdf82a8..ab557ecf68 100644 --- a/src/nvim/fold.c +++ b/src/nvim/fold.c @@ -241,6 +241,9 @@ hasFoldingWin ( 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/nvim/version.c b/src/nvim/version.c index 9115c6a59f..d292039cc7 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -70,7 +70,7 @@ static int included_patches[] = { 702, //701, //700, - //699, + 699, //698, //697, //696, -- cgit