[nvim] fix winbar on transparent bg

This commit is contained in:
Afonso Franco 2025-01-07 16:33:32 +00:00
parent e2613dd01a
commit 6febba69a8
Signed by: afonso
SSH key fingerprint: SHA256:PQTRDHPH3yALEGtHXnXBp3Orfcn21pK20t0tS1kHg54

View file

@ -47,7 +47,7 @@ function M.render()
local normal_fg_color = vim.api.nvim_get_hl_by_name('Normal', true).foreground
-- Convert the RGB color to a hex string
local bg_hex_color = string.format('#%06x', normal_bg_color)
local bg_hex_color = normal_bg_color and string.format('#%06x', normal_bg_color) or 'transparent'
-- Convert the RGB color to a hex string
local fg_hex_color = string.format('#%06x', normal_fg_color)