fix(#1712): invalid window ID on colorscheme (#1714)

This commit is contained in:
David Brouwer 2022-11-01 00:04:47 +01:00 committed by GitHub
parent cd2f7569db
commit ada2c6441d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -438,7 +438,7 @@ end
-- used on ColorScheme event
function M.reset_winhl()
if M.get_winnr() then
if M.get_winnr() and vim.api.nvim_win_is_valid(M.get_winnr()) then
vim.wo[M.get_winnr()].winhl = M.View.winopts.winhl
end
end