feat(api): combined highlights in nvim_eval_statusline()

Problem:  Combined highlighting was not applied to nvim_eval_statusline(),
          and 'statuscolumn' sign segment/numhl highlights.
Solution: Add an additional `groups` element to the return value of
          `nvim_eval_statusline()->highlights`. This is an array of stacked
          highlight groups (highest priority last). Also resolve combined
          highlights for the 'statuscolumn' sign segment/numhl highlights.
          Expose/synchronize some drawline.c logic that is now mimicked in
          three different places.
This commit is contained in:
Luuk van Baal
2025-01-16 18:10:22 +01:00
committed by luukvbaal
parent 8634bd46b2
commit 34d808b73c
14 changed files with 244 additions and 236 deletions

View File

@ -1709,31 +1709,34 @@ describe('float window', function()
feed('ix<cr>y<cr><esc>gg')
api.nvim_open_win(0, false, {relative='editor', width=20, height=4, row=4, col=10, style='minimal'})
if multigrid then
screen:expect{grid=[[
## grid 1
[2:----------------------------------------]|*6
[3:----------------------------------------]|
## grid 2
{20: 1}{30: }{22:^x}{21: }|
{14: 2}{19: }{22:y} |
{14: 3}{19: }{22: } |
{0:~ }|*3
## grid 3
|
## grid 4
{15:x }|
{15:y }|
{15: }|*2
]], float_pos={[4] = {1001, "NW", 1, 4, 10, true}}}
screen:expect({
grid = [[
## grid 1
[2:----------------------------------------]|*6
[3:----------------------------------------]|
## grid 2
{20: 1}{19: }{22:^x}{21: }|
{14: 2}{19: }{22:y} |
{14: 3}{19: }{22: } |
{0:~ }|*3
## grid 3
|
## grid 4
{15:x }|
{15:y }|
{15: }|*2
]],
float_pos = { [4] = { 1001, "NW", 1, 4, 10, true, 50 } },
})
else
screen:expect{grid=[[
{20: 1}{30: }{22:^x}{21: }|
screen:expect([[
{20: 1}{19: }{22:^x}{21: }|
{14: 2}{19: }{22:y} |
{14: 3}{19: }{22: } {15:x } |
{0:~ }{15:y }{0: }|
{0:~ }{15: }{0: }|*2
|
]]}
]])
end
end)