Skip to content

Commit e360a32

Browse files
committed
Close nvim tree if last buffer
1 parent 224854c commit e360a32

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/nvim-tree/view.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ local function close(tabpage)
193193
local tree_win = M.get_winnr(tabpage)
194194
local current_win = vim.api.nvim_get_current_win()
195195
for _, win in pairs(vim.api.nvim_tabpage_list_wins(tabpage)) do
196-
if tree_win ~= win and vim.api.nvim_win_get_config(win).relative == "" then
196+
if vim.api.nvim_win_get_config(win).relative == "" then
197197
local prev_win = vim.fn.winnr "#" -- this tab only
198198
if tree_win == current_win and prev_win > 0 then
199199
vim.api.nvim_set_current_win(vim.fn.win_getid(prev_win))

0 commit comments

Comments
 (0)