fixup: don't apply padding to empty components

This commit is contained in:
shadmansaleh 2023-03-30 12:13:15 +06:00
parent f850cb6776
commit 7bd381c68b
1 changed files with 4 additions and 2 deletions

View File

@ -276,8 +276,10 @@ function M:draw(default_highlight, is_focused)
end end
if type(status) == 'string' and (#status > 0 or self.options.draw_empty) then if type(status) == 'string' and (#status > 0 or self.options.draw_empty) then
self.status = status self.status = status
if #status > 0 then
self:apply_icon() self:apply_icon()
self:apply_padding() self:apply_padding()
end
self:apply_on_click() self:apply_on_click()
self:apply_highlights(default_highlight) self:apply_highlights(default_highlight)
self:apply_section_separators() self:apply_section_separators()