diff options
| author | Ghjuvan Lacambre <code@lacamb.re> | 2021-04-04 20:43:22 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-04 14:43:22 -0400 |
| commit | 0f187700ab1437e949f03d6915df7c76f8287304 (patch) | |
| tree | 235da971e8133a11ad3b3aa3ef077370564521ea /src/nvim/testdir | |
| parent | 76f5c72860b237d66c949dcdeb6967047810b956 (diff) | |
| download | rneovim-0f187700ab1437e949f03d6915df7c76f8287304.tar.gz rneovim-0f187700ab1437e949f03d6915df7c76f8287304.tar.bz2 rneovim-0f187700ab1437e949f03d6915df7c76f8287304.zip | |
vim-patch:8.2.0295: highlighting for :s wrong when using different separator (#14286)
Problem: Highlighting for :s wrong when using different separator.
Solution: Use separat argument for search direction and separator. (Rob
Pilling, closes vim/vim#5665)
https://github.com/vim/vim/commit/c036e87bd7001238ab7cc5d9e30e59bbf989a5fd
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_search.vim | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_search.vim b/src/nvim/testdir/test_search.vim index d4d529e4b9..7aa01c61ca 100644 --- a/src/nvim/testdir/test_search.vim +++ b/src/nvim/testdir/test_search.vim @@ -723,6 +723,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 + " Similar to Test_incsearch_substitute_dump() for :sort func Test_incsearch_sort_dump() if !exists('+incsearch') |