aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-04-23 19:51:32 +0800
committerGitHub <noreply@github.com>2022-04-23 19:51:32 +0800
commita98cf154ed9a05f3a2bdfa6e354547c954d2f052 (patch)
tree9454df69215492ed28acb667022928e56344b0bf /src/nvim/testdir
parent4e4914ab2e523f100c06fc5fb253f8625cc67232 (diff)
parent79ab277011e4668e2a6368be8ed908dc572af80f (diff)
downloadrneovim-a98cf154ed9a05f3a2bdfa6e354547c954d2f052.tar.gz
rneovim-a98cf154ed9a05f3a2bdfa6e354547c954d2f052.tar.bz2
rneovim-a98cf154ed9a05f3a2bdfa6e354547c954d2f052.zip
Merge pull request #18226 from zeertzjq/vim-8.2.4805
vim-patch:8.2.{4805,4812}: CurSearch used for all matches in current line
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_search.vim11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/nvim/testdir/test_search.vim b/src/nvim/testdir/test_search.vim
index 24ecc58281..d359e69f91 100644
--- a/src/nvim/testdir/test_search.vim
+++ b/src/nvim/testdir/test_search.vim
@@ -951,7 +951,7 @@ func Test_hlsearch_cursearch()
let lines =<< trim END
set hlsearch scrolloff=0
- call setline(1, ['one', 'foo', 'bar', 'baz', 'foo', 'bar'])
+ call setline(1, ['one', 'foo', 'bar', 'baz', 'foo the foo and foo', 'bar'])
hi Search ctermbg=yellow
hi CurSearch ctermbg=blue
END
@@ -964,7 +964,14 @@ func Test_hlsearch_cursearch()
call term_sendkeys(buf, "n")
call VerifyScreenDump(buf, 'Test_hlsearch_cursearch_single_line_2', {})
- call term_sendkeys(buf, "?\<CR>")
+ call term_sendkeys(buf, "n")
+ call VerifyScreenDump(buf, 'Test_hlsearch_cursearch_single_line_2a', {})
+
+ call term_sendkeys(buf, "n")
+ call VerifyScreenDump(buf, 'Test_hlsearch_cursearch_single_line_2b', {})
+
+ call term_sendkeys(buf, ":call setline(5, 'foo')\<CR>")
+ call term_sendkeys(buf, "0?\<CR>")
call VerifyScreenDump(buf, 'Test_hlsearch_cursearch_single_line_3', {})
call term_sendkeys(buf, "gg/foo\\nbar\<CR>")