fix(ghost_text): safely apply virtual_text highlight (#1563)

This commit is contained in:
François Fleur
2023-05-12 06:42:39 +00:00
committed by GitHub
parent 935b4069ce
commit d153771162

View File

@@ -37,7 +37,7 @@ ghost_text_view.new = function()
if #text > 0 then
vim.api.nvim_buf_set_extmark(0, ghost_text_view.ns, row - 1, col, {
right_gravity = false,
virt_text = { { text, c.hl_group or 'Comment' } },
virt_text = { { text, type(c) == 'table' and c.hl_group or 'Comment' } },
virt_text_pos = 'overlay',
hl_mode = 'combine',
ephemeral = true,