Mercurial > vim
diff src/ex_getln.c @ 14976:676db1b7fc35 v8.1.0499
patch 8.1.0499: :2vimgrep causes an ml_get error
commit https://github.com/vim/vim/commit/1c29943416207e21abbc790eaf563b36789170c2
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Oct 28 14:36:09 2018 +0100
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 28 Oct 2018 14:45:05 +0100 |
parents | 27b9a84395b5 |
children | 7b2dcca9e0c1 |
line wrap: on
line diff
--- 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