Skip to content

Commit

Permalink
fix(ghost_text): safely apply virtual_text highlight (#1563)
Browse files Browse the repository at this point in the history
  • Loading branch information
soifou authored May 12, 2023
1 parent 935b406 commit d153771
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/cmp/view/ghost_text_view.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit d153771

Please sign in to comment.