diff src/testdir/test_quickfix.vim @ 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 940def6df43f
children 3a3c9b638187
line wrap: on
line diff
--- a/src/testdir/test_quickfix.vim
+++ b/src/testdir/test_quickfix.vim
@@ -2364,6 +2364,21 @@ func Test_vimgrep()
   call XvimgrepTests('l')
 endfunc
 
+" Test for incsearch highlighting of the :vimgrep pattern
+" This test used to cause "E315: ml_get: invalid lnum" errors.
+func Test_vimgrep_incsearch()
+  enew
+  set incsearch
+  call test_override("char_avail", 1)
+
+  call feedkeys(":2vimgrep assert test_quickfix.vim test_cdo.vim\<CR>", "ntx")
+  let l = getqflist()
+  call assert_equal(2, len(l))
+
+  call test_override("ALL", 0)
+  set noincsearch
+endfunc
+
 func XfreeTests(cchar)
   call s:setup_commands(a:cchar)