diff options
| author | Aufar Gilbran <aufargilbran@gmail.com> | 2020-08-10 20:36:56 +0800 |
|---|---|---|
| committer | Aufar Gilbran <aufargilbran@gmail.com> | 2020-09-11 10:31:41 +0800 |
| commit | 50da4d4f451c24f53189a66b653236ac72cd2353 (patch) | |
| tree | 888800d09784356e63124463f9bfcf203c842af5 /src/nvim/testdir | |
| parent | dd08f6367b9ecd231028ee19b479b5ad723458e4 (diff) | |
| download | rneovim-50da4d4f451c24f53189a66b653236ac72cd2353.tar.gz rneovim-50da4d4f451c24f53189a66b653236ac72cd2353.tar.bz2 rneovim-50da4d4f451c24f53189a66b653236ac72cd2353.zip | |
vim-patch:8.1.0277: 'incsearch' highlighting wrong in a few cases
Problem: 'incsearch' highlighting wrong in a few cases.
Solution: Fix using last search pattern. Restore highlighting when changing
command. (issue vim/vim#3321)
https://github.com/vim/vim/commit/c7f08b7ee1c1ff2080d425c2fcdb6907c26fc98e
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_search.vim | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_search.vim b/src/nvim/testdir/test_search.vim index 333f5807fd..c2093f47fd 100644 --- a/src/nvim/testdir/test_search.vim +++ b/src/nvim/testdir/test_search.vim @@ -614,6 +614,7 @@ func Test_incsearch_substitute_dump() sleep 100m " Need to send one key at a time to force a redraw. + " Select three lines at the cursor with typed pattern. call term_sendkeys(buf, ':.,.+2s/') sleep 100m call term_sendkeys(buf, 'f') @@ -621,7 +622,21 @@ 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>") + + " Select three lines at the cursor using previous pattern. + 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>") call StopVimInTerminal(buf) |