aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-10-01 21:29:54 +0800
committerGitHub <noreply@github.com>2022-10-01 21:29:54 +0800
commit9353e2f7ef6d0919257548e1a43988404900bf03 (patch)
tree6752438c054b2f41af73c1a631857a4714acaf2b /test/functional/legacy
parente54541f7f941427b408f8d5a7bab446c141b5f76 (diff)
downloadrneovim-9353e2f7ef6d0919257548e1a43988404900bf03.tar.gz
rneovim-9353e2f7ef6d0919257548e1a43988404900bf03.tar.bz2
rneovim-9353e2f7ef6d0919257548e1a43988404900bf03.zip
vim-patch:8.2.2542: highlight of char beyond line end is not correct (#20424)
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 vim/vim#7883) https://github.com/vim/vim/commit/41f0895c6e3c7b921e3c102ad42be52b1be48018 Reorder test_search.vim to match Vim.
Diffstat (limited to 'test/functional/legacy')
-rw-r--r--test/functional/legacy/search_spec.lua30
1 files changed, 29 insertions, 1 deletions
diff --git a/test/functional/legacy/search_spec.lua b/test/functional/legacy/search_spec.lua
index 67991f5d48..5a94fca794 100644
--- a/test/functional/legacy/search_spec.lua
+++ b/test/functional/legacy/search_spec.lua
@@ -644,7 +644,35 @@ end)
describe('Search highlight', function()
before_each(clear)
- it('Search highlight is combined with Visual highlight vim-patch:8.2.2797', function()
+
+ -- oldtest: Test_hlsearch_dump()
+ it('beyond line end vim-patch:8.2.2542', function()
+ local screen = Screen.new(50, 6)
+ screen:set_default_attr_ids({
+ [1] = {bold = true, foreground = Screen.colors.Blue}, -- NonText
+ [2] = {background = Screen.colors.Yellow}, -- Search
+ [3] = {background = Screen.colors.Grey90}, -- CursorLine
+ })
+ screen:attach()
+ exec([[
+ set hlsearch noincsearch cursorline
+ call setline(1, ["xxx", "xxx", "xxx"])
+ /.*
+ 2
+ ]])
+ feed([[/\_.*<CR>]])
+ screen:expect([[
+ {2:xxx } |
+ {2:xxx } |
+ {2:^xxx }{3: }|
+ {1:~ }|
+ {1:~ }|
+ /\_.* |
+ ]])
+ end)
+
+ -- oldtest: Test_hlsearch_and_visual()
+ it('is combined with Visual highlight vim-patch:8.2.2797', function()
local screen = Screen.new(40, 6)
screen:set_default_attr_ids({
[1] = {bold = true, foreground = Screen.colors.Blue}, -- NonText