Skip to content

Commit 70bdf49

Browse files
committed
chore: remove quit_on_open from view and use abandon current window
1 parent 40e515d commit 70bdf49

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

lua/nvim-tree.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ local function setup_autocommands(opts)
370370
if not opts.actions.open_file.quit_on_open then
371371
create_nvim_tree_autocmd("BufWipeout", { pattern = "NvimTree_*", callback = view._prevent_buffer_override })
372372
else
373-
create_nvim_tree_autocmd("BufWipeout", { pattern = "NvimTree_*", callback = view.quit_on_open })
373+
create_nvim_tree_autocmd("BufWipeout", { pattern = "NvimTree_*", callback = view.abandon_current_window })
374374
end
375375

376376
if opts.hijack_directories.enable then

lua/nvim-tree/view.lua

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -284,10 +284,6 @@ function M.abandon_current_window()
284284
M.View.tabpages[tab].winnr = nil
285285
end
286286

287-
function M.quit_on_open()
288-
M.abandon_current_window()
289-
end
290-
291287
function M.is_visible(opts)
292288
if opts and opts.any_tabpage then
293289
for _, v in pairs(M.View.tabpages) do

0 commit comments

Comments
 (0)