fix: don't accidentally mess with state
This commit is contained in:
@@ -185,6 +185,10 @@ previewers.cat = defaulter(function(opts)
|
|||||||
end,
|
end,
|
||||||
|
|
||||||
teardown = function(self)
|
teardown = function(self)
|
||||||
|
if not self.state then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
if self.state.termopen_id then
|
if self.state.termopen_id then
|
||||||
pcall(vim.fn.chanclose, self.state.termopen_id)
|
pcall(vim.fn.chanclose, self.state.termopen_id)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user