summaryrefslogtreecommitdiffstats
path: root/src/ex_getln.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-10-28 14:36:09 +0100
committerBram Moolenaar <Bram@vim.org>2018-10-28 14:36:09 +0100
commit1c29943416207e21abbc790eaf563b36789170c2 (patch)
tree46c90eca7f6a9522182da5995737f6cd40c4e59d /src/ex_getln.c
parentd474686a09ef3f7529e65abe00cf8cd2ea8a95eb (diff)
patch 8.1.0499: :2vimgrep causes an ml_get errorv8.1.0499
Problem: :2vimgrep causes an ml_get error Solution: Pass tomatch pointer instead of value. (Yegappan Lakshmanan)
Diffstat (limited to 'src/ex_getln.c')
-rw-r--r--src/ex_getln.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ex_getln.c b/src/ex_getln.c
index e37ebe2c9e..31e646dd35 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -483,6 +483,12 @@ may_do_incsearch_highlighting(
if (search_first_line == 0)
// start at the original cursor position
curwin->w_cursor = is_state->search_start;
+ else if (search_first_line > curbuf->b_ml.ml_line_count)
+ {
+ // start after the last line
+ curwin->w_cursor.lnum = curbuf->b_ml.ml_line_count;
+ curwin->w_cursor.col = MAXCOL;
+ }
else
{
// start at the first line in the range