Skip to content

Commit 6a2af3a

Browse files
committed
fix: nocombine property being added infinite times in highlight group
1 parent 64aa18e commit 6a2af3a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lua/lualine/highlight.lua

+4-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,10 @@ function M.highlight(name, foreground, background, gui, link)
138138
else
139139
local foreground_rgb = sanitize_color(foreground)
140140
local background_rgb = sanitize_color(background)
141-
gui = (gui ~= nil and gui ~= '') and gui .. ',nocombine' or 'nocombine'
141+
gui = gui or ''
142+
if string.find(gui, 'nocombine') == nil then
143+
gui = gui ~= '' and gui .. ',nocombine' or 'nocombine'
144+
end
142145
if
143146
loaded_highlights[name]
144147
and loaded_highlights[name].fg == foreground_rgb

0 commit comments

Comments
 (0)