From 7ed897d77d13eb4a9f4ab576f58db9bdda9af6ec Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 12 Oct 2023 21:31:44 +0200 Subject: [PATCH] fix(virtual): extra check if buffer still valid that has virtual text extmark --- lua/noice/view/backend/virtualtext.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/noice/view/backend/virtualtext.lua b/lua/noice/view/backend/virtualtext.lua index 4e16a2a..ec07453 100644 --- a/lua/noice/view/backend/virtualtext.lua +++ b/lua/noice/view/backend/virtualtext.lua @@ -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