Skip to content

Commit

Permalink
fix: hijack directory "BufEnter", "BufNewFile" events are nested (#3044)
Browse files Browse the repository at this point in the history
Co-authored-by: Alexander Courtis <[email protected]>
  • Loading branch information
phanen and alex-courtis authored Jan 13, 2025
1 parent aae0185 commit 39bc630
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/nvim-tree.lua
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ local function setup_autocommands(opts)
end

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

if opts.view.centralize_selection then
Expand Down

0 comments on commit 39bc630

Please sign in to comment.