feat: support transitional seperators with transparent background

This commit is contained in:
shadmansaleh 2022-02-20 14:55:03 +06:00
parent 00020dc3fd
commit 605a30f2fe
1 changed files with 5 additions and 5 deletions

View File

@ -279,12 +279,12 @@ function M.get_transitional_highlights(left_hl, right_hl)
-- Get colors from highlights -- Get colors from highlights
local fg = modules.utils.extract_highlight_colors(left_hl, 'bg') local fg = modules.utils.extract_highlight_colors(left_hl, 'bg')
local bg = modules.utils.extract_highlight_colors(right_hl, 'bg') local bg = modules.utils.extract_highlight_colors(right_hl, 'bg')
if not fg or not bg then if not fg and not bg then
return nil return nil -- Color retrieval failed
end -- Color retrieval failed end
if bg == fg then if bg == fg then
return nil return nil -- Separator won't be visible anyway
end -- Separator won't be visible anyway end
M.highlight(highlight_name, fg, bg, nil) M.highlight(highlight_name, fg, bg, nil)
end end
return '%#' .. highlight_name .. '#' return '%#' .. highlight_name .. '#'