Skip to content

Commit 55f6342

Browse files
committed
schedule on enter to avoid running before vim first buffer has loaded
1 parent ff08a4a commit 55f6342

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lua/nvim-tree.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,8 @@ function M.setup(conf)
432432
setup_autocommands(opts)
433433
setup_vim_commands()
434434

435-
M.on_enter(opts)
435+
-- scheduling to make sure current buffer has initialized before running buffer checks for auto open
436+
vim.schedule(function() M.on_enter(opts) end)
436437
end
437438

438439
local out_config = {

0 commit comments

Comments
 (0)