diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ex_getln.c | 8 | ||||
-rw-r--r-- | src/testdir/dumps/Test_incsearch_substitute_11.dump | 9 | ||||
-rw-r--r-- | src/testdir/dumps/Test_incsearch_substitute_12.dump | 9 | ||||
-rw-r--r-- | src/testdir/dumps/Test_incsearch_substitute_13.dump | 9 | ||||
-rw-r--r-- | src/testdir/test_search.vim | 26 | ||||
-rw-r--r-- | src/version.c | 2 |
6 files changed, 43 insertions, 20 deletions
diff --git a/src/ex_getln.c b/src/ex_getln.c index 8f3833162b..c2c74534b0 100644 --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -445,10 +445,9 @@ finish_incsearch_highlighting( p_magic = is_state->magic_save; validate_cursor(); /* needed for TAB */ + redraw_all_later(SOME_VALID); if (call_update_screen) update_screen(SOME_VALID); - else - redraw_all_later(SOME_VALID); } } @@ -589,8 +588,11 @@ may_do_incsearch_highlighting( { next_char = ccline.cmdbuff[skiplen + patlen]; ccline.cmdbuff[skiplen + patlen] = NUL; - if (empty_pattern(ccline.cmdbuff)) + if (empty_pattern(ccline.cmdbuff) && !no_hlsearch) + { + redraw_all_later(SOME_VALID); set_no_hlsearch(TRUE); + } ccline.cmdbuff[skiplen + patlen] = next_char; } diff --git a/src/testdir/dumps/Test_incsearch_substitute_11.dump b/src/testdir/dumps/Test_incsearch_substitute_11.dump new file mode 100644 index 0000000000..0ec409f01a --- /dev/null +++ b/src/testdir/dumps/Test_incsearch_substitute_11.dump @@ -0,0 +1,9 @@ +|f+1&#ffffff0|o+0&#ffff4012@1| |1| +0&#ffffff0@64 +|f+0&#ffff4012|o@1| |2| +0&#ffffff0@64 +|f+0&#ffff4012|o@1| |3| +0&#ffffff0@64 +|[+3&&|N|o| |N|a|m|e|]| |[|+|]| @38|1|,|1| @11|T|o|p +|f+0&#ffff4012|o@1| |1| +0&#ffffff0@64 +|f+0&#ffff4012|o@1| |2| +0&#ffffff0@64 +|f+0&#ffff4012|o@1| |3| +0&#ffffff0@64 +|[+1&&|N|o| |N|a|m|e|]| |[|+|]| @38|2|,|1| @11|T|o|p +|:+0&&|%|s|/|.> @64 diff --git a/src/testdir/dumps/Test_incsearch_substitute_12.dump b/src/testdir/dumps/Test_incsearch_substitute_12.dump new file mode 100644 index 0000000000..02b73355dc --- /dev/null +++ b/src/testdir/dumps/Test_incsearch_substitute_12.dump @@ -0,0 +1,9 @@ +|f+0&#ffffff0|o@1| |1| @64 +|f|o@1| |2| @64 +|f|o@1| |3| @64 +|[+3&&|N|o| |N|a|m|e|]| |[|+|]| @38|1|,|1| @11|T|o|p +|f+0&&|o@1| |1| @64 +|f|o@1| |2| @64 +|f|o@1| |3| @64 +|[+1&&|N|o| |N|a|m|e|]| |[|+|]| @38|2|,|1| @11|T|o|p +|:+0&&|%|s|/> @65 diff --git a/src/testdir/dumps/Test_incsearch_substitute_13.dump b/src/testdir/dumps/Test_incsearch_substitute_13.dump new file mode 100644 index 0000000000..be3abb7121 --- /dev/null +++ b/src/testdir/dumps/Test_incsearch_substitute_13.dump @@ -0,0 +1,9 @@ +|f+0&#ffffff0|o@1| |1| @64 +>f|o@1| |2| @64 +|f|o@1| |3| @64 +|[+3&&|N|o| |N|a|m|e|]| |[|+|]| @38|2|,|1| @11|T|o|p +|f+0&&|o@1| |1| @64 +|f|o@1| |2| @64 +|f|o@1| |3| @64 +|[+1&&|N|o| |N|a|m|e|]| |[|+|]| @38|2|,|1| @11|T|o|p +| +0&&@69 diff --git a/src/testdir/test_search.vim b/src/testdir/test_search.vim index 56e0bf28eb..b05ed4271a 100644 --- a/src/testdir/test_search.vim +++ b/src/testdir/test_search.vim @@ -834,13 +834,11 @@ func Test_incsearch_search_dump() " 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>") @@ -899,7 +897,6 @@ func Test_incsearch_substitute_dump() call term_sendkeys(buf, 'o') sleep 100m call term_sendkeys(buf, 'o') - sleep 100m call VerifyScreenDump(buf, 'Test_incsearch_substitute_01', {}) call term_sendkeys(buf, "\<Esc>") @@ -907,30 +904,25 @@ func Test_incsearch_substitute_dump() call term_sendkeys(buf, "/foo\<CR>") sleep 100m call term_sendkeys(buf, ':.,.+2s//') - sleep 100m call VerifyScreenDump(buf, 'Test_incsearch_substitute_02', {}) " Deleting last slash should remove the match. call term_sendkeys(buf, "\<BS>") - sleep 100m call VerifyScreenDump(buf, 'Test_incsearch_substitute_03', {}) call term_sendkeys(buf, "\<Esc>") " Reverse range is accepted call term_sendkeys(buf, ':5,2s/foo') - sleep 100m call VerifyScreenDump(buf, 'Test_incsearch_substitute_04', {}) call term_sendkeys(buf, "\<Esc>") " White space after the command is skipped call term_sendkeys(buf, ':2,3sub /fo') - sleep 100m call VerifyScreenDump(buf, 'Test_incsearch_substitute_05', {}) call term_sendkeys(buf, "\<Esc>") " Command modifiers are skipped call term_sendkeys(buf, ':above below browse botr confirm keepmar keepalt keeppat keepjum filter xxx hide lockm leftabove noau noswap rightbel sandbox silent silent! $tab top unsil vert verbose 4,5s/fo.') - sleep 100m call VerifyScreenDump(buf, 'Test_incsearch_substitute_06', {}) call term_sendkeys(buf, "\<Esc>") @@ -938,13 +930,11 @@ func Test_incsearch_substitute_dump() call term_sendkeys(buf, ":set cursorline\<CR>") call term_sendkeys(buf, 'G9G') call term_sendkeys(buf, ':9,11s/bar') - sleep 100m call VerifyScreenDump(buf, 'Test_incsearch_substitute_07', {}) call term_sendkeys(buf, "\<Esc>") " Cursorline highlighting at cursor when no match call term_sendkeys(buf, ':9,10s/bar') - sleep 100m call VerifyScreenDump(buf, 'Test_incsearch_substitute_08', {}) call term_sendkeys(buf, "\<Esc>") @@ -952,7 +942,6 @@ func Test_incsearch_substitute_dump() call term_sendkeys(buf, '3G4G') call term_sendkeys(buf, ":nohlsearch\<CR>") call term_sendkeys(buf, ':6,7s/\v') - sleep 100m call VerifyScreenDump(buf, 'Test_incsearch_substitute_09', {}) call term_sendkeys(buf, "\<Esc>") @@ -965,6 +954,15 @@ func Test_incsearch_substitute_dump() call term_sendkeys(buf, "\<Esc>") call VerifyScreenDump(buf, 'Test_incsearch_substitute_10', {}) + call term_sendkeys(buf, ":split\<CR>") + call term_sendkeys(buf, ":let @/ = 'xyz'\<CR>") + call term_sendkeys(buf, ":%s/.") + call VerifyScreenDump(buf, 'Test_incsearch_substitute_11', {}) + call term_sendkeys(buf, "\<BS>") + call VerifyScreenDump(buf, 'Test_incsearch_substitute_12', {}) + call term_sendkeys(buf, "\<Esc>") + call VerifyScreenDump(buf, 'Test_incsearch_substitute_13', {}) + call StopVimInTerminal(buf) call delete('Xis_subst_script') endfunc @@ -988,7 +986,6 @@ func Test_incsearch_sort_dump() " Need to send one key at a time to force a redraw. call term_sendkeys(buf, ':sort ni u /on') - sleep 100m call VerifyScreenDump(buf, 'Test_incsearch_sort_01', {}) call term_sendkeys(buf, "\<Esc>") @@ -1015,27 +1012,22 @@ func Test_incsearch_vimgrep_dump() " Need to send one key at a time to force a redraw. call term_sendkeys(buf, ':vimgrep on') - sleep 100m call VerifyScreenDump(buf, 'Test_incsearch_vimgrep_01', {}) call term_sendkeys(buf, "\<Esc>") call term_sendkeys(buf, ':vimg /on/ *.txt') - sleep 100m call VerifyScreenDump(buf, 'Test_incsearch_vimgrep_02', {}) call term_sendkeys(buf, "\<Esc>") call term_sendkeys(buf, ':vimgrepadd "\<on') - sleep 100m call VerifyScreenDump(buf, 'Test_incsearch_vimgrep_03', {}) call term_sendkeys(buf, "\<Esc>") call term_sendkeys(buf, ':lv "tha') - sleep 100m call VerifyScreenDump(buf, 'Test_incsearch_vimgrep_04', {}) call term_sendkeys(buf, "\<Esc>") call term_sendkeys(buf, ':lvimgrepa "the" **/*.txt') - sleep 100m call VerifyScreenDump(buf, 'Test_incsearch_vimgrep_05', {}) call term_sendkeys(buf, "\<Esc>") diff --git a/src/version.c b/src/version.c index adde06a3ad..f991cd0d41 100644 --- a/src/version.c +++ b/src/version.c @@ -795,6 +795,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 399, +/**/ 398, /**/ 397, |