0
0
mirror of https://github.com/vim/vim.git synced 2025-09-28 04:24:06 -04:00

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)
This commit is contained in:
Bram Moolenaar
2015-04-13 20:52:36 +02:00
parent 9bc174b69d
commit 05b20fb14e
2 changed files with 4 additions and 0 deletions

View 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)