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:
Iron-E 2021-01-26 12:37:13 -05:00
parent 15d834494e
commit 8757a6c228
No known key found for this signature in database
GPG Key ID: 19B71B7B7B021D22
1 changed files with 2 additions and 2 deletions

View File

@ -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