Skip to content

Commit 03ac610

Browse files
authored
try get hl
1 parent 5750d07 commit 03ac610

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lua/codeshot/theme.lua

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@ function theme._gen_hl(hl)
1111
end
1212
end
1313

14+
local bg = hl.background or hl.bg or hl.guibg or nil
15+
local fg = hl.foreground or hl.fg or hl.guifg or nil
16+
1417
return {
15-
bg = hl.background and string.format('#%06x', hl.background) or '',
16-
fg = hl.foreground and string.format('#%06x', hl.foreground) or '',
18+
bg = string.format('#%06x', bg) or '',
19+
fg = string.format('#%06x', fg) or '',
1720
style = style,
1821
}
1922
end

0 commit comments

Comments
 (0)