1

Refresh generated neovim config

This commit is contained in:
2024-08-15 13:01:03 +02:00
parent 64b51cf53a
commit f5af8e2b28
1836 changed files with 38979 additions and 31094 deletions

View File

@ -1098,6 +1098,58 @@ describe("nui.layout", function()
})
end)
it("handles if child.grow results in height <= 0", function()
layout = get_initial_layout({ position = 0, size = "100%" })
layout:update(Layout.Box({
Layout.Box(p1, { size = win_height }),
Layout.Box(p2, { grow = 1 }),
}, { dir = "col" }))
layout:mount()
local expected_layout_config = {
relative = {
type = "win",
winid = winid,
},
position = {
row = 0,
col = 0,
},
size = {
width = win_width,
height = win_height,
},
}
assert_layout_config(expected_layout_config)
assert_component = get_assert_component(layout)
assert_component(p1, {
position = {
row = 0,
col = 0,
},
size = {
width = win_width,
height = win_height,
},
})
assert_component(p2, {
position = {
row = win_height,
col = 0,
},
size = {
width = win_width,
height = 1,
},
})
end)
it("can change boxes", function()
layout = Layout(
{ position = 0, size = "100%" },