aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/highlight_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-03-12 15:41:39 +0800
committerGitHub <noreply@github.com>2023-03-12 15:41:39 +0800
commit314f20a44fdfdc382b0ce9d124290d3e7d702d42 (patch)
treea553e0b5618ccc3e925ca8ff4f467177e4fb17a7 /test/functional/ui/highlight_spec.lua
parent172227a44642b67ec8af5b438e5373a3daf61fdb (diff)
downloadrneovim-314f20a44fdfdc382b0ce9d124290d3e7d702d42.tar.gz
rneovim-314f20a44fdfdc382b0ce9d124290d3e7d702d42.tar.bz2
rneovim-314f20a44fdfdc382b0ce9d124290d3e7d702d42.zip
test: use a wider screen in the rightleft winhl test (#22641)
With a wide screen this actually previously caused an overflow.
Diffstat (limited to 'test/functional/ui/highlight_spec.lua')
-rw-r--r--test/functional/ui/highlight_spec.lua27
1 files changed, 18 insertions, 9 deletions
diff --git a/test/functional/ui/highlight_spec.lua b/test/functional/ui/highlight_spec.lua
index 2bbc29b78f..d5e0eefb41 100644
--- a/test/functional/ui/highlight_spec.lua
+++ b/test/functional/ui/highlight_spec.lua
@@ -1812,19 +1812,28 @@ describe("'winhighlight' highlight", function()
]])
end)
- it('works for background color in rightleft window in vsplit #22640', function()
- screen:try_resize(40, 6)
+ it('works for background color in rightleft window #22640', function()
+ -- Use a wide screen to also check that this doesn't overflow linebuf_attr.
+ screen:try_resize(80, 6)
insert('aa')
command('setlocal rightleft')
- command('botright vsplit')
command('setlocal winhl=Normal:Background1')
screen:expect([[
- aa│{1: ^aa}|
- {0: ~}│{2: ~}|
- {0: ~}│{2: ~}|
- {0: ~}│{2: ~}|
- {4:[No Name] [+] }{3:[No Name] [+] }|
- |
+ {1: ^aa}|
+ {2: ~}|
+ {2: ~}|
+ {2: ~}|
+ {2: ~}|
+ |
+ ]])
+ command('botright vsplit')
+ screen:expect([[
+ {1: aa│ ^aa}|
+ {2: ~}{1:│}{2: ~}|
+ {2: ~}{1:│}{2: ~}|
+ {2: ~}{1:│}{2: ~}|
+ {4:[No Name] [+] }{3:[No Name] [+] }|
+ |
]])
end)