mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
Make linemode spacing consistent between solo and children_add linemodes
This commit is contained in:
parent
907ac09e34
commit
ea674d61d9
1 changed files with 5 additions and 6 deletions
|
|
@ -14,14 +14,10 @@ function Linemode:solo()
|
|||
end
|
||||
|
||||
if not self[mode] then
|
||||
return ui.Line(" " .. mode .. " ")
|
||||
return ui.Line(mode)
|
||||
end
|
||||
|
||||
return ui.Line {
|
||||
ui.Span(" "),
|
||||
self[mode](self),
|
||||
ui.Span(" "),
|
||||
}
|
||||
return ui.Line { self[mode](self) }
|
||||
end
|
||||
|
||||
function Linemode:size()
|
||||
|
|
@ -63,6 +59,9 @@ function Linemode:render()
|
|||
local lines = {}
|
||||
for _, c in ipairs(self._children) do
|
||||
lines[#lines + 1] = (type(c[1]) == "string" and self[c[1]] or c[1])(self)
|
||||
if lines[#lines] and lines[#lines]:width() > 0 then
|
||||
lines[#lines + 1] = ui.Line { ui.Span(" ") }
|
||||
end
|
||||
end
|
||||
return ui.Line(lines)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue