fix: don't throw errors when closing code window (#2401)
This commit is contained in:
@@ -218,7 +218,9 @@ end
|
|||||||
|
|
||||||
function Sidebar:recover_code_winhl()
|
function Sidebar:recover_code_winhl()
|
||||||
if self.code.old_winhl ~= nil then
|
if self.code.old_winhl ~= nil then
|
||||||
vim.wo[self.code.winid].winhl = self.code.old_winhl
|
if self.code.winid and api.nvim_win_is_valid(self.code.winid) then
|
||||||
|
vim.wo[self.code.winid].winhl = self.code.old_winhl
|
||||||
|
end
|
||||||
self.code.old_winhl = nil
|
self.code.old_winhl = nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user