diff src/testdir/test_search.vim @ 14615:c6b41d47bac1 v8.1.0321

patch 8.1.0321: 'incsearch' regression: / highlights everything commit https://github.com/vim/vim/commit/4edfe2d2a2d70ea66a7f73e9b923c2d1f6246a57 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Aug 23 20:55:45 2018 +0200 patch 8.1.0321: 'incsearch' regression: /\v highlights everything Problem: 'incsearch' regression: /\v highlights everything. Solution: Put back the empty_pattern() check.
author Christian Brabandt <cb@256bit.org>
date Thu, 23 Aug 2018 21:00:06 +0200
parents 3f9b73cc8adb
children f3b183c3d3e2
line wrap: on
line diff
--- a/src/testdir/test_search.vim
+++ b/src/testdir/test_search.vim
@@ -813,6 +813,41 @@ func Test_incsearch_scrolling()
   call delete('Xscript')
 endfunc
 
+func Test_incsearch_search_dump()
+  if !exists('+incsearch')
+    return
+  endif
+  if !CanRunVimInTerminal()
+    return
+  endif
+  call writefile([
+	\ 'set incsearch hlsearch scrolloff=0',
+	\ 'for n in range(1, 8)',
+	\ '  call setline(n, "foo " . n)',
+	\ 'endfor',
+	\ '3',
+	\ ], 'Xis_search_script')
+  let buf = RunVimInTerminal('-S Xis_search_script', {'rows': 9, 'cols': 70})
+  " Give Vim a chance to redraw to get rid of the spaces in line 2 caused by
+  " the 'ambiwidth' check.
+  sleep 100m
+
+  " Need to send one key at a time to force a redraw.
+  call term_sendkeys(buf, '/fo')
+  sleep 100m
+  call VerifyScreenDump(buf, 'Test_incsearch_search_01', {})
+  call term_sendkeys(buf, "\<Esc>")
+  sleep 100m
+
+  call term_sendkeys(buf, '/\v')
+  sleep 100m
+  call VerifyScreenDump(buf, 'Test_incsearch_search_02', {})
+  call term_sendkeys(buf, "\<Esc>")
+
+  call StopVimInTerminal(buf)
+  call delete('Xis_search_script')
+endfunc
+
 func Test_incsearch_substitute()
   if !exists('+incsearch')
     return
@@ -926,7 +961,7 @@ func Test_incsearch_substitute_dump()
 endfunc
 
 " Similar to Test_incsearch_substitute_dump() for :sort
-func Test_incsearch_ssort_dump()
+func Test_incsearch_sort_dump()
   if !exists('+incsearch')
     return
   endif