fix(#2624): open file from docked floating window (#2627)

This commit is contained in:
Alexander Courtis 2024-01-14 11:08:15 +11:00 committed by GitHub
parent b8c3a23e76
commit f24afa2cef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -24,7 +24,7 @@ function M.get_node_at_cursor()
return
end
local cursor = vim.api.nvim_win_get_cursor(view.get_winnr())
local cursor = vim.api.nvim_win_get_cursor(winnr)
local line = cursor[1]
if line == 1 and view.is_root_folder_visible(core.get_cwd()) then

View File

@ -473,7 +473,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 then
if tabinfo ~= nil and vim.api.nvim_win_is_valid(tabinfo.winnr) then
return tabinfo.winnr
end
end