diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-09-13 01:33:53 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-09-13 08:25:20 -0400 |
commit | 476c50903a38a2ab85546c6f061117950d6e79fc (patch) | |
tree | ac1657af6803e98c9fb537fef13ad5827eb10b37 /src/nvim/ex_getln.c | |
parent | cc049a5612a08b810f5897f7b108e0cdaba445b7 (diff) | |
download | rneovim-476c50903a38a2ab85546c6f061117950d6e79fc.tar.gz rneovim-476c50903a38a2ab85546c6f061117950d6e79fc.tar.bz2 rneovim-476c50903a38a2ab85546c6f061117950d6e79fc.zip |
vim-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)
https://github.com/vim/vim/commit/1c29943416207e21abbc790eaf563b36789170c2
Diffstat (limited to 'src/nvim/ex_getln.c')
-rw-r--r-- | src/nvim/ex_getln.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c index c966c780a0..fe52a6cfa7 100644 --- a/src/nvim/ex_getln.c +++ b/src/nvim/ex_getln.c @@ -443,6 +443,10 @@ static void may_do_incsearch_highlighting(int firstc, long count, if (search_first_line == 0) { // start at the original cursor position curwin->w_cursor = s->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 curwin->w_cursor.lnum = search_first_line; |