refactor(#2837): multi instance reload (#2885)

* refactor(#2837): multi instance reload

* refactor(#2837): multi instance reload
This commit is contained in:
Alexander Courtis
2024-09-01 15:50:03 +10:00
committed by GitHub
parent 43c3c36c7a
commit ea55ef1203
6 changed files with 282 additions and 290 deletions

View File

@@ -76,9 +76,12 @@ function M.create_watcher(node)
else
log.line("watcher", "node event executing refresh '%s'", node.absolute_path)
end
require("nvim-tree.explorer.reload").refresh_node(node, function()
require("nvim-tree.renderer").draw()
end)
local explorer = require("nvim-tree.core").get_explorer()
if explorer then
explorer:refresh_node(node, function()
require("nvim-tree.renderer").draw()
end)
end
end)
end