aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/float_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-09-22 15:36:24 +0800
committerGitHub <noreply@github.com>2023-09-22 15:36:24 +0800
commit64e8a3c4d19eab40888fbac36b96e97bd9d68c42 (patch)
treed8292fcfe24ce5779a0f27ac1e006e251e3a3ea2 /test/functional/ui/float_spec.lua
parent34a786bc49598eeafef3fffcb0836d4557e51638 (diff)
downloadrneovim-64e8a3c4d19eab40888fbac36b96e97bd9d68c42.tar.gz
rneovim-64e8a3c4d19eab40888fbac36b96e97bd9d68c42.tar.bz2
rneovim-64e8a3c4d19eab40888fbac36b96e97bd9d68c42.zip
fix(ui): handle virtual text with multiple hl in more cases (#25304)
Diffstat (limited to 'test/functional/ui/float_spec.lua')
-rw-r--r--test/functional/ui/float_spec.lua17
1 files changed, 11 insertions, 6 deletions
diff --git a/test/functional/ui/float_spec.lua b/test/functional/ui/float_spec.lua
index 4fea513249..93ca1aef3f 100644
--- a/test/functional/ui/float_spec.lua
+++ b/test/functional/ui/float_spec.lua
@@ -821,7 +821,7 @@ describe('float window', function()
[4] = {bold = true, reverse = true},
[5] = {reverse = true},
[6] = {background = Screen.colors.LightMagenta, bold = true, reverse = true},
- [7] = {foreground = Screen.colors.Grey100, background = Screen.colors.Red},
+ [7] = {foreground = Screen.colors.White, background = Screen.colors.Red},
[8] = {bold = true, foreground = Screen.colors.SeaGreen4},
[9] = {background = Screen.colors.LightGrey, underline = true},
[10] = {background = Screen.colors.LightGrey, underline = true, bold = true, foreground = Screen.colors.Magenta},
@@ -2512,7 +2512,12 @@ describe('float window', function()
]]}
end
- meths.win_set_config(win, {title= { {"🦄"},{"BB"}},title_pos="right",footer= { {"🦄"},{"BB"}},footer_pos="right"})
+ command('hi B0 guibg=Red guifg=Black')
+ command('hi B1 guifg=White')
+ meths.win_set_config(win, {
+ title = {{"🦄"}, {"BB", {"B0", "B1"}}}, title_pos = "right",
+ footer= {{"🦄"}, {"BB", {"B0", "B1"}}}, footer_pos = "right",
+ })
if multigrid then
screen:expect{grid=[[
## grid 1
@@ -2533,10 +2538,10 @@ describe('float window', function()
## grid 3
|
## grid 4
- {5:╔═════}🦄BB{5:╗}|
+ {5:╔═════}🦄{7:BB}{5:╗}|
{5:║}{1: halloj! }{5:║}|
{5:║}{1: BORDAA }{5:║}|
- {5:╚═════}🦄BB{5:╝}|
+ {5:╚═════}🦄{7:BB}{5:╝}|
]], float_pos={
[4] = { { id = 1001 }, "NW", 1, 2, 5, true }
}, win_viewport={
@@ -2547,10 +2552,10 @@ describe('float window', function()
screen:expect{grid=[[
^ |
{0:~ }|
- {0:~ }{5:╔═════}🦄BB{5:╗}{0: }|
+ {0:~ }{5:╔═════}🦄{7:BB}{5:╗}{0: }|
{0:~ }{5:║}{1: halloj! }{5:║}{0: }|
{0:~ }{5:║}{1: BORDAA }{5:║}{0: }|
- {0:~ }{5:╚═════}🦄BB{5:╝}{0: }|
+ {0:~ }{5:╚═════}🦄{7:BB}{5:╝}{0: }|
|
]]}
end