diff options
author | Luuk van Baal <luukvbaal@gmail.com> | 2025-01-16 18:10:22 +0100 |
---|---|---|
committer | luukvbaal <luukvbaal@gmail.com> | 2025-01-23 10:56:25 +0100 |
commit | 34d808b73cbcb0a43636d826282193ab1ca8c148 (patch) | |
tree | 1a03834e3651002e92bf3a4732b05c061aa97898 /test/functional/ui/float_spec.lua | |
parent | 8634bd46b26f28fa26950128b0cc585560bd6a9a (diff) | |
download | rneovim-34d808b73cbcb0a43636d826282193ab1ca8c148.tar.gz rneovim-34d808b73cbcb0a43636d826282193ab1ca8c148.tar.bz2 rneovim-34d808b73cbcb0a43636d826282193ab1ca8c148.zip |
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.
Diffstat (limited to 'test/functional/ui/float_spec.lua')
-rw-r--r-- | test/functional/ui/float_spec.lua | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/test/functional/ui/float_spec.lua b/test/functional/ui/float_spec.lua index ca26c46fc5..27ab0feb9c 100644 --- a/test/functional/ui/float_spec.lua +++ b/test/functional/ui/float_spec.lua @@ -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) |