Skip to content

Commit d54a187

Browse files
authored
fix: invalid window id for popup info window (#3147)
1 parent aa08778 commit d54a187

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lua/nvim-tree/actions/node/file-popup.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ end
5757

5858
function M.close_popup()
5959
if current_popup ~= nil then
60-
vim.api.nvim_win_close(current_popup.winnr, true)
60+
if vim.api.nvim_win_is_valid(current_popup.winnr) then
61+
vim.api.nvim_win_close(current_popup.winnr, true)
62+
end
6163
vim.cmd("augroup NvimTreeRemoveFilePopup | au! CursorMoved | augroup END")
6264

6365
current_popup = nil

0 commit comments

Comments
 (0)