fix: hijack directory "BufEnter", "BufNewFile" events are nested (#3044)

Co-authored-by: Alexander Courtis <alex@courtis.org>
This commit is contained in:
phanium 2025-01-13 12:39:10 +08:00 committed by GitHub
parent aae01853dd
commit 39bc630816
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -190,7 +190,7 @@ local function setup_autocommands(opts)
end end
if opts.hijack_directories.enable then if opts.hijack_directories.enable then
create_nvim_tree_autocmd({ "BufEnter", "BufNewFile" }, { callback = M.open_on_directory }) create_nvim_tree_autocmd({ "BufEnter", "BufNewFile" }, { callback = M.open_on_directory, nested = true })
end end
if opts.view.centralize_selection then if opts.view.centralize_selection then