0
0
mirror of https://github.com/vim/vim.git synced 2025-10-05 05:34:07 -04:00

patch 8.1.0499: :2vimgrep causes an ml_get error

Problem:    :2vimgrep causes an ml_get error
Solution:   Pass tomatch pointer instead of value. (Yegappan Lakshmanan)
This commit is contained in:
Bram Moolenaar
2018-10-28 14:36:09 +01:00
parent d474686a09
commit 1c29943416
4 changed files with 27 additions and 4 deletions

View File

@@ -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