diff options
author | Bram Moolenaar <Bram@vim.org> | 2015-04-13 20:52:36 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2015-04-13 20:52:36 +0200 |
commit | 05b20fb14ec3219d73014595cfb6cc28ae1e1fc3 (patch) | |
tree | 82f3665897738a2ee2a91681dff9c4919801f3e1 | |
parent | 9bc174b69d2775b0f27ed74bf372608d18c9f3d4 (diff) | |
download | vim-05b20fb14ec3219d73014595cfb6cc28ae1e1fc3.zip |
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)
-rw-r--r-- | src/fold.c | 2 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/fold.c b/src/fold.c index 41fcee0fd..671bbf75a 100644 --- a/src/fold.c +++ b/src/fold.c @@ -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) diff --git a/src/version.c b/src/version.c index 4a35a90a8..9d1eb7977 100644 --- a/src/version.c +++ b/src/version.c @@ -742,6 +742,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 699, +/**/ 698, /**/ 697, |