From e3a558bc1dfbda29cde5b356b975a8abaf3f41b2 Mon Sep 17 00:00:00 2001 From: Shadman Date: Fri, 23 Apr 2021 17:41:41 +0600 Subject: [PATCH] Fix component separator not removed for string color (#192) --- lua/lualine/utils/section.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/lualine/utils/section.lua b/lua/lualine/utils/section.lua index 0ba3cc4..4fa3559 100644 --- a/lua/lualine/utils/section.lua +++ b/lua/lualine/utils/section.lua @@ -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