We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d41b4ca commit 9cd4473Copy full SHA for 9cd4473
lua/nvim-tree/view.lua
@@ -226,8 +226,8 @@ local function close(tabpage)
226
if tree_win == current_win and prev_win > 0 then
227
vim.api.nvim_set_current_win(vim.fn.win_getid(prev_win))
228
end
229
- if vim.api.nvim_win_is_valid(tree_win or 0) then
230
- vim.api.nvim_win_close(tree_win or 0, true)
+ if tree_win and vim.api.nvim_win_is_valid(tree_win) then
+ vim.api.nvim_win_close(tree_win, true)
231
232
events._dispatch_on_tree_close()
233
return
0 commit comments