fix: passing nil as window handle in view.get_winnr Co-authored-by: Alexander Courtis <alex@courtis.org>
This commit is contained in:
parent
75ff64e666
commit
48b1d8638f
@ -464,7 +464,7 @@ end
|
||||
function M.get_winnr(tabpage)
|
||||
tabpage = tabpage or vim.api.nvim_get_current_tabpage()
|
||||
local tabinfo = M.View.tabpages[tabpage]
|
||||
if tabinfo ~= nil and vim.api.nvim_win_is_valid(tabinfo.winnr) then
|
||||
if tabinfo and tabinfo.winnr and vim.api.nvim_win_is_valid(tabinfo.winnr) then
|
||||
return tabinfo.winnr
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
Reference in New Issue
Block a user