diff src/testdir/test_search.vim @ 24000:bb2e921d2601 v8.2.2542

patch 8.2.2542: highlight of char beyond line end is not correct Commit: https://github.com/vim/vim/commit/41f0895c6e3c7b921e3c102ad42be52b1be48018 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Feb 22 22:13:49 2021 +0100 patch 8.2.2542: highlight of char beyond line end is not correct Problem: Highlight of char beyond line end is not correct. (Chuan Wei Foo) Solution: Fix counting NUL as one cell. Draw one more character if the EOL is part of the match. (closes #7883)
author Bram Moolenaar <Bram@vim.org>
date Mon, 22 Feb 2021 22:15:03 +0100
parents bb29b09902d5
children e3efa11b6a1e
line wrap: on
line diff
--- a/src/testdir/test_search.vim
+++ b/src/testdir/test_search.vim
@@ -944,6 +944,26 @@ func Test_incsearch_search_dump()
   call delete('Xis_search_script')
 endfunc
 
+func Test_hlsearch_dump()
+  CheckOption hlsearch
+  CheckScreendump
+
+  call writefile([
+	\ 'set hlsearch cursorline',
+        \ 'call setline(1, ["xxx", "xxx", "xxx"])',
+	\ '/.*',
+	\ '2',
+	\ ], 'Xhlsearch_script')
+  let buf = RunVimInTerminal('-S Xhlsearch_script', {'rows': 6, 'cols': 50})
+  call VerifyScreenDump(buf, 'Test_hlsearch_1', {})
+
+  call term_sendkeys(buf, "/\\_.*\<CR>")
+  call VerifyScreenDump(buf, 'Test_hlsearch_2', {})
+
+  call StopVimInTerminal(buf)
+  call delete('Xhlsearch_script')
+endfunc
+
 func Test_incsearch_substitute()
   CheckOption incsearch