diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-12-04 09:09:00 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2022-12-04 10:07:05 +0800 |
| commit | 46e4be0fd0002233bde613295607ce5eeb498567 (patch) | |
| tree | 4e12bbbb51cca63f4f745c6061139768a381380b /src/nvim/testdir | |
| parent | a91ba088abf7b21f640f671ad7f211c0957b4765 (diff) | |
| download | rneovim-46e4be0fd0002233bde613295607ce5eeb498567.tar.gz rneovim-46e4be0fd0002233bde613295607ce5eeb498567.tar.bz2 rneovim-46e4be0fd0002233bde613295607ce5eeb498567.zip | |
vim-patch:8.2.2295: incsearch does not detect empty pattern properly
Problem: Incsearch does not detect empty pattern properly.
Solution: Return magic state when skipping over a pattern. (Christian
Brabandt, closes vim/vim#7612, closes vim/vim#6420)
https://github.com/vim/vim/commit/d93a7fc1a98a58f8101ee780d4735079ad99ae35
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_search.vim | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_search.vim b/src/nvim/testdir/test_search.vim index 0702e89ebb..8bb7d8687f 100644 --- a/src/nvim/testdir/test_search.vim +++ b/src/nvim/testdir/test_search.vim @@ -1969,6 +1969,35 @@ func Test_incsearch_highlighting_newline() bw endfunc +func Test_incsearch_substitute_dump2() + CheckOption incsearch + CheckScreendump + + call writefile([ + \ 'set incsearch hlsearch scrolloff=0', + \ 'for n in range(1, 4)', + \ ' call setline(n, "foo " . n)', + \ 'endfor', + \ 'call setline(5, "abc|def")', + \ '3', + \ ], 'Xis_subst_script2') + let buf = RunVimInTerminal('-S Xis_subst_script2', {'rows': 9, 'cols': 70}) + + call term_sendkeys(buf, ':%s/\vabc|') + sleep 100m + call VerifyScreenDump(buf, 'Test_incsearch_sub_01', {}) + call term_sendkeys(buf, "\<Esc>") + + " The following should not be highlighted + call term_sendkeys(buf, ':1,5s/\v|') + sleep 100m + call VerifyScreenDump(buf, 'Test_incsearch_sub_02', {}) + + + call StopVimInTerminal(buf) + call delete('Xis_subst_script2') +endfunc + func Test_no_last_search_pattern() CheckOption incsearch |