commit | 05b20fb14ec3219d73014595cfb6cc28ae1e1fc3 | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Mon Apr 13 20:52:36 2015 +0200 |
committer | Bram Moolenaar <Bram@vim.org> | Mon Apr 13 20:52:36 2015 +0200 |
tree | 82f3665897738a2ee2a91681dff9c4919801f3e1 | |
parent | 9bc174b69d2775b0f27ed74bf372608d18c9f3d4 [diff] [blame] |
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)
diff --git a/src/fold.c b/src/fold.c index 41fcee0..671bbf7 100644 --- a/src/fold.c +++ b/src/fold.c
@@ -234,6 +234,8 @@ 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)