aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgrtlr <lyzrd17@gmail.com>2015-04-25 19:00:25 +0200
committerMichael Reed <m.reed@mykolab.com>2015-04-25 19:30:38 -0400
commitdd8531dbb5042241d20f11ca97436d6d8249c087 (patch)
tree31f4092e3461fa243351dccbbffd44614a42d134
parentb464f251093705d95602d888deab04bd24bb8266 (diff)
downloadrneovim-dd8531dbb5042241d20f11ca97436d6d8249c087.tar.gz
rneovim-dd8531dbb5042241d20f11ca97436d6d8249c087.tar.bz2
rneovim-dd8531dbb5042241d20f11ca97436d6d8249c087.zip
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
-rw-r--r--src/nvim/fold.c3
-rw-r--r--src/nvim/version.c2
2 files changed, 4 insertions, 1 deletions
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,