@@ -201,7 +201,10 @@ local function setup_autocommands(opts)
201201 create_nvim_tree_autocmd (" BufWritePost" , {
202202 callback = function ()
203203 if opts .auto_reload_on_write and not opts .filesystem_watchers .enable then
204- actions .reloaders .reload_explorer ()
204+ local explorer = core .get_explorer ()
205+ if explorer then
206+ explorer :reload_explorer ()
207+ end
205208 end
206209 end ,
207210 })
@@ -217,7 +220,7 @@ local function setup_autocommands(opts)
217220 (explorer .filters .config .filter_no_buffer or renderer .config .highlight_opened_files ~= " none" ) and vim .bo [data .buf ].buftype == " "
218221 then
219222 utils .debounce (" Buf:filter_buffer" , opts .view .debounce_delay , function ()
220- actions . reloaders . reload_explorer ()
223+ explorer : reload_explorer ()
221224 end )
222225 end
223226 end ,
@@ -234,7 +237,7 @@ local function setup_autocommands(opts)
234237 (explorer .filters .config .filter_no_buffer or renderer .config .highlight_opened_files ~= " none" ) and vim .bo [data .buf ].buftype == " "
235238 then
236239 utils .debounce (" Buf:filter_buffer" , opts .view .debounce_delay , function ()
237- actions . reloaders . reload_explorer ()
240+ explorer : reload_explorer ()
238241 end )
239242 end
240243 end ,
@@ -244,7 +247,10 @@ local function setup_autocommands(opts)
244247 pattern = { " FugitiveChanged" , " NeogitStatusRefreshed" },
245248 callback = function ()
246249 if not opts .filesystem_watchers .enable and opts .git .enable then
247- actions .reloaders .reload_git ()
250+ local explorer = core .get_explorer ()
251+ if explorer then
252+ explorer :reload_git ()
253+ end
248254 end
249255 end ,
250256 })
@@ -292,7 +298,10 @@ local function setup_autocommands(opts)
292298 callback = function ()
293299 if utils .is_nvim_tree_buf (0 ) then
294300 if vim .fn .getcwd () ~= core .get_cwd () or (opts .reload_on_bufenter and not opts .filesystem_watchers .enable ) then
295- actions .reloaders .reload_explorer ()
301+ local explorer = core .get_explorer ()
302+ if explorer then
303+ explorer :reload_explorer ()
304+ end
296305 end
297306 end
298307 end ,
@@ -343,7 +352,10 @@ local function setup_autocommands(opts)
343352 callback = function ()
344353 utils .debounce (" Buf:modified" , opts .view .debounce_delay , function ()
345354 buffers .reload_modified ()
346- actions .reloaders .reload_explorer ()
355+ local explorer = core .get_explorer ()
356+ if explorer then
357+ explorer :reload_explorer ()
358+ end
347359 end )
348360 end ,
349361 })
0 commit comments