diff --git a/lua/telescope/previewers.lua b/lua/telescope/previewers.lua index 44c1f09..3f0713d 100644 --- a/lua/telescope/previewers.lua +++ b/lua/telescope/previewers.lua @@ -185,6 +185,10 @@ previewers.cat = defaulter(function(opts) end, teardown = function(self) + if not self.state then + return + end + if self.state.termopen_id then pcall(vim.fn.chanclose, self.state.termopen_id) end