diff options
author | grtlr <lyzrd17@gmail.com> | 2015-04-25 19:00:25 +0200 |
---|---|---|
committer | Michael Reed <m.reed@mykolab.com> | 2015-04-25 19:30:38 -0400 |
commit | dd8531dbb5042241d20f11ca97436d6d8249c087 (patch) | |
tree | 31f4092e3461fa243351dccbbffd44614a42d134 /src/nvim/fold.c | |
parent | b464f251093705d95602d888deab04bd24bb8266 (diff) | |
download | rneovim-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
Diffstat (limited to 'src/nvim/fold.c')
-rw-r--r-- | src/nvim/fold.c | 3 |
1 files changed, 3 insertions, 0 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) |