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

@ -57,6 +57,12 @@ local function get_child_size(parent, child, container_size, growable_dimension_
if child.component.border then
inner_size.width = inner_size.width - child.component.border._.size_delta.width
inner_size.height = inner_size.height - child.component.border._.size_delta.height
if inner_size.height <= 0 then
local height_adjustment = math.abs(inner_size.height) + 1
inner_size.height = inner_size.height + height_adjustment
outer_size.height = outer_size.height + height_adjustment
end
end
end

View File

@ -484,7 +484,7 @@ function Border:init(popup, options)
style = "minimal",
border = "none",
focusable = false,
zindex = self.popup.win_config.zindex - 1,
zindex = self.popup.win_config.zindex,
anchor = self.popup.win_config.anchor,
}

View File

@ -1 +1 @@
/nix/store/3czmrawji85vf8979kll2yx2f1kjkric-lua-5.1.5
/nix/store/rn8bzg423wwkayzbsbmhmvcgjmbzrq5z-lua-5.1.5

View File

@ -7,7 +7,7 @@ rock_manifest = {
},
layout = {
["README.md"] = "cdd351f847db0d9e63ebceb0ada39115",
["float.lua"] = "38bdadf586d846d8efa37b8c0c918875",
["float.lua"] = "3d671b671099235a48080e976b8bc74a",
["init.lua"] = "8666f900e2b378fd21a3b29794b2c025",
["split.lua"] = "9853b5bb1c63e58b0008c366674614aa",
["utils.lua"] = "929be3bbfe1837164b2ef864d780b2f6"
@ -25,7 +25,7 @@ rock_manifest = {
},
popup = {
["README.md"] = "dbc4ec093f427ebee98ffa0b17045817",
["border.lua"] = "ebe777b415171e0b1681ae23be67d051",
["border.lua"] = "153090d01075ac1b651fc343e916a6ff",
["init.lua"] = "025311d292812d4c0f43d49d4112e40c"
},
split = {
@ -65,7 +65,7 @@ rock_manifest = {
["init_spec.lua"] = "1f8d79b288391b3452787a11e317e347"
},
layout = {
["init_spec.lua"] = "74040ea45f937f0a0c66137563ad02a6",
["init_spec.lua"] = "f82928b2f0ee436340dc92620aed2315",
["utils_spec.lua"] = "595c80e6c8deea405dfe7afc999bdf89"
},
line = {

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%" },