Mercurial > vim
diff src/testdir/test_search.vim @ 19475:5512aa74cb62 v8.2.0295
patch 8.2.0295: highlighting for :s wrong when using different separator
Commit: https://github.com/vim/vim/commit/c036e87bd7001238ab7cc5d9e30e59bbf989a5fd
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Feb 21 21:30:52 2020 +0100
patch 8.2.0295: highlighting for :s wrong when using different separator
Problem: Highlighting for :s wrong when using different separator.
Solution: Use separat argument for search direction and separator. (Rob
Pilling, closes #5665)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 21 Feb 2020 21:45:04 +0100 |
parents | 8f8a5a15d00a |
children | 599793519c85 |
line wrap: on
line diff
--- a/src/testdir/test_search.vim +++ b/src/testdir/test_search.vim @@ -1084,6 +1084,30 @@ func Test_incsearch_substitute_dump() call delete('Xis_subst_script') endfunc +func Test_incsearch_highlighting() + if !exists('+incsearch') + return + endif + if !CanRunVimInTerminal() + throw 'Skipped: cannot make screendumps' + endif + + call writefile([ + \ 'set incsearch hlsearch', + \ 'call setline(1, "hello/there")', + \ ], 'Xis_subst_hl_script') + let buf = RunVimInTerminal('-S Xis_subst_hl_script', {'rows': 4, 'cols': 20}) + " Give Vim a chance to redraw to get rid of the spaces in line 2 caused by + " the 'ambiwidth' check. + sleep 300m + + " Using a different search delimiter should still highlight matches + " that contain a '/'. + call term_sendkeys(buf, ":%s;ello/the") + call VerifyScreenDump(buf, 'Test_incsearch_substitute_15', {}) + call term_sendkeys(buf, "<Esc>") +endfunc + func Test_incsearch_with_change() if !has('timers') || !exists('+incsearch') || !CanRunVimInTerminal() throw 'Skipped: cannot make screendumps and/or timers feature and/or incsearch option missing'