mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 09:12:07 +00:00
Merge pull request #22910 from bfredl/nonormal
fix(highlight): use winhl=Foo:Bar even when Bar is empty
This commit is contained in:
@@ -4935,6 +4935,53 @@ describe('float window', function()
|
||||
end)
|
||||
end)
|
||||
|
||||
it("can use Normal as background", function()
|
||||
local buf = meths.create_buf(false,false)
|
||||
meths.buf_set_lines(buf,0,-1,true,{"here", "float"})
|
||||
local win = meths.open_win(buf, false, {relative='editor', width=20, height=2, row=2, col=5})
|
||||
meths.set_option_value('winhl', 'Normal:Normal', {win=win})
|
||||
|
||||
if multigrid then
|
||||
screen:expect{grid=[[
|
||||
## grid 1
|
||||
[2:----------------------------------------]|
|
||||
[2:----------------------------------------]|
|
||||
[2:----------------------------------------]|
|
||||
[2:----------------------------------------]|
|
||||
[2:----------------------------------------]|
|
||||
[2:----------------------------------------]|
|
||||
[3:----------------------------------------]|
|
||||
## grid 2
|
||||
^ |
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
## grid 3
|
||||
|
|
||||
## grid 5
|
||||
here |
|
||||
float |
|
||||
]], float_pos={
|
||||
[5] = {{id = 1002}, "NW", 1, 2, 5, true, 50};
|
||||
}, win_viewport={
|
||||
[2] = {win = {id = 1000}, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0};
|
||||
[5] = {win = {id = 1002}, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 2, sum_scroll_delta = 0};
|
||||
}}
|
||||
else
|
||||
screen:expect{grid=[[
|
||||
^ |
|
||||
{0:~ }|
|
||||
{0:~ }here {0: }|
|
||||
{0:~ }float {0: }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
|
|
||||
]]}
|
||||
end
|
||||
end)
|
||||
|
||||
describe("handles :wincmd", function()
|
||||
local win
|
||||
local expected_pos
|
||||
|
Reference in New Issue
Block a user