aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-04-21 19:59:25 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-04-21 20:19:58 +0800
commit4b19f94c2800b6ab89db57919d35c9696f48cef7 (patch)
tree42fa6fe12cd07542605c96c595f75dbc65314975 /src/nvim/testdir
parente6dec30332f2538ae45d58e6bb674c8a28422fe9 (diff)
downloadrneovim-4b19f94c2800b6ab89db57919d35c9696f48cef7.tar.gz
rneovim-4b19f94c2800b6ab89db57919d35c9696f48cef7.tar.bz2
rneovim-4b19f94c2800b6ab89db57919d35c9696f48cef7.zip
vim-patch:8.2.4759: CurSearch highlight does not work for multi-line match
Problem: CurSearch highlight does not work for multi-line match. Solution: Check cursor position before adjusting columns. (closes vim/vim#10133) https://github.com/vim/vim/commit/693ccd11606b59eb0f81c6c1948679e61ada4022
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_search.vim12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/nvim/testdir/test_search.vim b/src/nvim/testdir/test_search.vim
index 6ccc151294..24ecc58281 100644
--- a/src/nvim/testdir/test_search.vim
+++ b/src/nvim/testdir/test_search.vim
@@ -968,7 +968,17 @@ func Test_hlsearch_cursearch()
call VerifyScreenDump(buf, 'Test_hlsearch_cursearch_single_line_3', {})
call term_sendkeys(buf, "gg/foo\\nbar\<CR>")
- call VerifyScreenDump(buf, 'Test_hlsearch_cursearch_multiple_line', {})
+ call VerifyScreenDump(buf, 'Test_hlsearch_cursearch_multiple_line_1', {})
+
+ call term_sendkeys(buf, ":call setline(1, ['---', 'abcdefg', 'hijkl', '---', 'abcdefg', 'hijkl'])\<CR>")
+ call term_sendkeys(buf, "gg/efg\\nhij\<CR>")
+ call VerifyScreenDump(buf, 'Test_hlsearch_cursearch_multiple_line_2', {})
+ call term_sendkeys(buf, "h\<C-L>")
+ call VerifyScreenDump(buf, 'Test_hlsearch_cursearch_multiple_line_3', {})
+ call term_sendkeys(buf, "j\<C-L>")
+ call VerifyScreenDump(buf, 'Test_hlsearch_cursearch_multiple_line_4', {})
+ call term_sendkeys(buf, "h\<C-L>")
+ call VerifyScreenDump(buf, 'Test_hlsearch_cursearch_multiple_line_5', {})
call StopVimInTerminal(buf)
call delete('Xhlsearch_cursearch')