fix(diff): fallback if Normal has no fg color. Closes #2436

This commit is contained in:
Folke Lemaitre 2025-11-04 22:23:26 +01:00
parent 493256ec10
commit 7f453c4f32
No known key found for this signature in database
GPG key ID: 9B52594D560070AB

View file

@ -10,6 +10,7 @@ local function diff_linenr(...)
local fg = Snacks.util.color(vim.list_extend({ ... }, { "NormalFloat", "Normal" }))
local bg = Snacks.util.color(vim.list_extend({ ... }, { "NormalFloat", "Normal" }), "bg")
bg = bg or vim.o.background == "dark" and "#1e1e1e" or "#f5f5f5"
fg = fg or vim.o.background == "dark" and "#f5f5f5" or "#1e1e1e"
return {
fg = fg,
bg = Snacks.util.blend(fg, bg, 0.1),