fix(float): missing default highlight for title

Problem: there is missing default title highlight when highlight not defined in title text chunk.

Solution: when attr is not set use default title highlight group.
This commit is contained in:
glepnir
2024-05-03 15:53:13 +08:00
parent 4e5c633ed4
commit 8b2b1fba2a
5 changed files with 27 additions and 22 deletions

View File

@@ -2127,7 +2127,7 @@ describe('float window', function()
## grid 3
|
## grid 4
{5:╔═════}🦄BB{5:╗}|
{5:╔═════}{11:🦄BB}{5:╗}|
{5:║}{1: halloj! }{5:║}|
{5:║}{1: BORDAA }{5:║}|
{5:╚═════════╝}|
@@ -2141,7 +2141,7 @@ describe('float window', function()
screen:expect{grid=[[
^ |
{0:~ }|
{0:~ }{5:╔═════}🦄BB{5:╗}{0: }|
{0:~ }{5:╔═════}{11:🦄BB}{5:╗}{0: }|
{0:~ }{5:║}{1: halloj! }{5:║}{0: }|
{0:~ }{5:║}{1: BORDAA }{5:║}{0: }|
{0:~ }{5:╚═════════╝}{0: }|
@@ -2275,7 +2275,7 @@ describe('float window', function()
{5:╔═════════╗}|
{5:║}{1: halloj! }{5:║}|
{5:║}{1: BORDAA }{5:║}|
{5:╚═════}🦄BB{5:╝}|
{5:╚═════}{11:🦄BB}{5:╝}|
]], float_pos={
[4] = { 1001, "NW", 1, 2, 5, true }
}, win_viewport={
@@ -2289,7 +2289,7 @@ describe('float window', function()
{0:~ }{5:╔═════════╗}{0: }|
{0:~ }{5:║}{1: halloj! }{5:║}{0: }|
{0:~ }{5:║}{1: BORDAA }{5:║}{0: }|
{0:~ }{5:╚═════}🦄BB{5:╝}{0: }|
{0:~ }{5:╚═════}{11:🦄BB}{5:╝}{0: }|
|
]]}
end
@@ -2423,10 +2423,10 @@ describe('float window', function()
## grid 3
|
## grid 4
{5:╔═════}🦄{7:BB}{5:╗}|
{5:╔═════}{11:🦄}{7:BB}{5:╗}|
{5:║}{1: halloj! }{5:║}|
{5:║}{1: BORDAA }{5:║}|
{5:╚═════}🦄{7:BB}{5:╝}|
{5:╚═════}{11:🦄}{7:BB}{5:╝}|
]], float_pos={
[4] = { 1001, "NW", 1, 2, 5, true }
}, win_viewport={
@@ -2437,10 +2437,10 @@ describe('float window', function()
screen:expect{grid=[[
^ |
{0:~ }|
{0:~ }{5:╔═════}🦄{7:BB}{5:╗}{0: }|
{0:~ }{5:╔═════}{11:🦄}{7:BB}{5:╗}{0: }|
{0:~ }{5:║}{1: halloj! }{5:║}{0: }|
{0:~ }{5:║}{1: BORDAA }{5:║}{0: }|
{0:~ }{5:╚═════}🦄{7:BB}{5:╝}{0: }|
{0:~ }{5:╚═════}{11:🦄}{7:BB}{5:╝}{0: }|
|
]]}
end