@@ -201,7 +201,10 @@ local function setup_autocommands(opts)
201
201
create_nvim_tree_autocmd (" BufWritePost" , {
202
202
callback = function ()
203
203
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
205
208
end
206
209
end ,
207
210
})
@@ -217,7 +220,7 @@ local function setup_autocommands(opts)
217
220
(explorer .filters .config .filter_no_buffer or renderer .config .highlight_opened_files ~= " none" ) and vim .bo [data .buf ].buftype == " "
218
221
then
219
222
utils .debounce (" Buf:filter_buffer" , opts .view .debounce_delay , function ()
220
- actions . reloaders . reload_explorer ()
223
+ explorer : reload_explorer ()
221
224
end )
222
225
end
223
226
end ,
@@ -234,7 +237,7 @@ local function setup_autocommands(opts)
234
237
(explorer .filters .config .filter_no_buffer or renderer .config .highlight_opened_files ~= " none" ) and vim .bo [data .buf ].buftype == " "
235
238
then
236
239
utils .debounce (" Buf:filter_buffer" , opts .view .debounce_delay , function ()
237
- actions . reloaders . reload_explorer ()
240
+ explorer : reload_explorer ()
238
241
end )
239
242
end
240
243
end ,
@@ -244,7 +247,10 @@ local function setup_autocommands(opts)
244
247
pattern = { " FugitiveChanged" , " NeogitStatusRefreshed" },
245
248
callback = function ()
246
249
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
248
254
end
249
255
end ,
250
256
})
@@ -292,7 +298,10 @@ local function setup_autocommands(opts)
292
298
callback = function ()
293
299
if utils .is_nvim_tree_buf (0 ) then
294
300
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
296
305
end
297
306
end
298
307
end ,
@@ -343,7 +352,10 @@ local function setup_autocommands(opts)
343
352
callback = function ()
344
353
utils .debounce (" Buf:modified" , opts .view .debounce_delay , function ()
345
354
buffers .reload_modified ()
346
- actions .reloaders .reload_explorer ()
355
+ local explorer = core .get_explorer ()
356
+ if explorer then
357
+ explorer :reload_explorer ()
358
+ end
347
359
end )
348
360
end ,
349
361
})
0 commit comments