0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.1.0321: 'incsearch' regression: /\v highlights everything

Problem:    'incsearch' regression: /\v highlights everything.
Solution:   Put back the empty_pattern() check.
This commit is contained in:
Bram Moolenaar
2018-08-23 20:55:45 +02:00
parent 8b0d5ce881
commit 4edfe2d2a2
5 changed files with 67 additions and 1 deletions

View File

@@ -0,0 +1,9 @@
|f+0&#ffff4012|o|o+0&#ffffff0| |1| @64
|f+0&#ffff4012|o|o+0&#ffffff0| |2| @64
|f+0&#ffff4012|o|o+0&#ffffff0| |3| @64
|f+1&&|o|o+0&&| |4| @64
|f+0&#ffff4012|o|o+0&#ffffff0| |5| @64
|f+0&#ffff4012|o|o+0&#ffffff0| |6| @64
|f+0&#ffff4012|o|o+0&#ffffff0| |7| @64
|f+0&#ffff4012|o|o+0&#ffffff0| |8| @64
|/|f|o> @66

View File

@@ -0,0 +1,9 @@
|f+0&#ffffff0|o@1| |1| @64
|f|o@1| |2| @64
|f|o+1&&|o+0&&| |3| @64
|f|o@1| |4| @64
|f|o@1| |5| @64
|f|o@1| |6| @64
|f|o@1| |7| @64
|f|o@1| |8| @64
|/|\|v> @66

View File

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