Skip to content

Commit

Permalink
Fix showing label when it is disabled
Browse files Browse the repository at this point in the history
Fixes #38
  • Loading branch information
monkoose committed Oct 16, 2024
1 parent 37e66aa commit db05edf
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lua/neocodeium/completer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -380,11 +380,9 @@ function Completer:update_forward_line()
self.inline[1].text = self.block.text:sub(col + 1)
self:clear_block()
-- required to update label position
nvim_buf_set_extmark(0, ns, self.pos[1], 0, {
id = self.label.id,
virt_text = { { " 0 ", "NeoCodeiumLabel" } },
virt_text_win_col = -4,
})
if options.show_label and self.label.enabled then
show_label(self.label.id, " 0 ", self.pos[1])
end
end
self.inline[1].id = show_inline(nil, self.inline[1].text, lnum, col)
end
Expand Down

0 comments on commit db05edf

Please sign in to comment.