Skip to content

Commit bf47640

Browse files
authored
fix: use correct fallback mixing color for transparent bg on light themes (#175)
Fixes #174
1 parent ecce93f commit bf47640

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

lua/tiny-inline-diagnostic/highlights.lua

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,17 @@ end
6464
---@return string
6565
local function get_mixing_color(color)
6666
if color == "None" then
67-
return vim.g.background == "light" and "#ffffff" or "#000000"
67+
return vim.o.background == "light" and "#ffffff" or "#000000"
6868
end
6969
if color:sub(1, 1) == "#" then
7070
return color
7171
end
72-
return get_highlight(color).bg
72+
73+
local resolved = get_highlight(color).bg
74+
if resolved == "None" then
75+
return vim.o.background == "light" and "#ffffff" or "#000000"
76+
end
77+
return resolved
7378
end
7479

7580
---Check if the cursorline is visible

0 commit comments

Comments
 (0)