Fix component separator not removed for string color (#192)

This commit is contained in:
Shadman 2021-04-23 17:41:41 +06:00 committed by GitHub
parent 2f17e432ee
commit e3a558bc1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -28,8 +28,9 @@ function M.draw_section(section, highlight_name)
status[component_no] = section[component_no]:strip_separator()
end
-- Remove component separator when color option is used to color background
if section[component_no].options.color and
section[component_no].options.color.bg then
if (type(section[component_no].options.color) == 'table' and
section[component_no].options.color.bg) or
type(section[component_no].options.color) == 'string' then
next_component_colored = true
status[component_no] = section[component_no]:strip_separator()
end