Skip to content

Commit 0933b46

Browse files
committed
fix: check for explorer before force_dirchange in open_on_directory
1 parent e4f7cc5 commit 0933b46

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lua/nvim-tree.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,12 @@ function M.open_on_directory()
121121
return
122122
end
123123

124+
125+
local explorer = core.get_explorer()
126+
if not explorer then
127+
core.init(bufname)
128+
end
129+
124130
explorer_fn("force_dirchange", bufname, true)
125131
end
126132

0 commit comments

Comments
 (0)