Skip to content

Commit 0a2f219

Browse files
committed
fix: add optional tabpage integer parameter to view.close
if tabpage is not nil, then the function closes the tabpage in this specific tabpage
1 parent 505167e commit 0a2f219

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lua/nvim-tree/view.lua

+4-1
Original file line numberDiff line numberDiff line change
@@ -270,9 +270,12 @@ function M.close_all_tabs()
270270
end
271271
end
272272

273-
function M.close()
273+
---@param tabpage integer|nil
274+
function M.close(tabpage)
274275
if M.View.tab.sync.close then
275276
M.close_all_tabs()
277+
elseif tabpage then
278+
close(tabpage)
276279
else
277280
M.close_this_tab_only()
278281
end

0 commit comments

Comments
 (0)