From 50da4d4f451c24f53189a66b653236ac72cd2353 Mon Sep 17 00:00:00 2001 From: Aufar Gilbran Date: Mon, 10 Aug 2020 20:36:56 +0800 Subject: 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 --- src/nvim/testdir/test_search.vim | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/nvim/testdir') 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, "\") + + " Select three lines at the cursor using previous pattern. + call term_sendkeys(buf, "/foo\") + 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, "\") + sleep 100m + call VerifyScreenDump(buf, 'Test_incsearch_substitute_03', {}) call term_sendkeys(buf, "\") call StopVimInTerminal(buf) -- cgit