chore: remove quit_on_open from view and use abandon current window
This commit is contained in:
@@ -370,7 +370,7 @@ local function setup_autocommands(opts)
|
|||||||
if not opts.actions.open_file.quit_on_open then
|
if not opts.actions.open_file.quit_on_open then
|
||||||
create_nvim_tree_autocmd("BufWipeout", { pattern = "NvimTree_*", callback = view._prevent_buffer_override })
|
create_nvim_tree_autocmd("BufWipeout", { pattern = "NvimTree_*", callback = view._prevent_buffer_override })
|
||||||
else
|
else
|
||||||
create_nvim_tree_autocmd("BufWipeout", { pattern = "NvimTree_*", callback = view.quit_on_open })
|
create_nvim_tree_autocmd("BufWipeout", { pattern = "NvimTree_*", callback = view.abandon_current_window })
|
||||||
end
|
end
|
||||||
|
|
||||||
if opts.hijack_directories.enable then
|
if opts.hijack_directories.enable then
|
||||||
|
|||||||
@@ -284,10 +284,6 @@ function M.abandon_current_window()
|
|||||||
M.View.tabpages[tab].winnr = nil
|
M.View.tabpages[tab].winnr = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.quit_on_open()
|
|
||||||
M.abandon_current_window()
|
|
||||||
end
|
|
||||||
|
|
||||||
function M.is_visible(opts)
|
function M.is_visible(opts)
|
||||||
if opts and opts.any_tabpage then
|
if opts and opts.any_tabpage then
|
||||||
for _, v in pairs(M.View.tabpages) do
|
for _, v in pairs(M.View.tabpages) do
|
||||||
|
|||||||
Reference in New Issue
Block a user