Skip to content

Commit 74ae970

Browse files
authored
#1184 only close the current tabpage (#1188)
1 parent bf467a7 commit 74ae970

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lua/nvim-tree/view.lua

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,12 @@ function M._prevent_buffer_override()
357357
local curbuf = a.nvim_win_get_buf(curwin)
358358
local bufname = a.nvim_buf_get_name(curbuf)
359359
if not bufname:match "NvimTree" then
360-
M.View.tabpages = {}
360+
for i, tabpage in ipairs(M.View.tabpages) do
361+
if tabpage.winnr == view_winnr then
362+
M.View.tabpages[i] = nil
363+
break
364+
end
365+
end
361366
end
362367
if curwin ~= view_winnr or bufname == "" or curbuf == view_bufnr then
363368
return

0 commit comments

Comments
 (0)