fix(highlite): `:terminal` shows wrong colors
This was caused by the index of `vim.g.terminal_color_X` beginning at 1 rather than 0. I thought initially that this would be translated by the Lua metatable but I guess not! CLOSES #8
This commit is contained in:
parent
15d834494e
commit
8757a6c228
|
@ -153,8 +153,8 @@ function highlite.highlight(highlight_group, attributes) -- {{{ †
|
|||
end --}}} ‡
|
||||
|
||||
function highlite:highlight_terminal(terminal_ansi_colors)
|
||||
for index, color in ipairs(terminal_ansi_colors) do
|
||||
vim.g['terminal_color_'..index] = vim.o.termguicolors and color[_PALETTE_HEX] or color[_PALETTE_256] or get(color, _PALETTE_ANSI)
|
||||
for index, color in ipairs(terminal_ansi_colors) do vim.g['terminal_color_'..(index-1)] =
|
||||
vim.o.termguicolors and color[_PALETTE_HEX] or color[_PALETTE_256] or get(color, _PALETTE_ANSI)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue