Skip to content

Commit

Permalink
fix(virtual): extra check if buffer still valid that has virtual text…
Browse files Browse the repository at this point in the history
… extmark
  • Loading branch information
folke committed Oct 12, 2023
1 parent df05426 commit 7ed897d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/noice/view/backend/virtualtext.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function VirtualText:show()
end

function VirtualText:hide()
if self.extmark then
if self.extmark and vim.api.nvim_buf_is_valid(self.buf) then
vim.api.nvim_buf_del_extmark(self.buf, Config.ns, self.extmark)
end
end
Expand Down

0 comments on commit 7ed897d

Please sign in to comment.