refactor(#2882, #2883): multi instance explore, reloaders (#2897)

* refactor(#2883): multi instance explore

* refactor(#2882): multi instance reloaders

* style
This commit is contained in:
Alexander Courtis
2024-09-14 15:35:31 +10:00
committed by GitHub
parent 03f737e574
commit cd9c6db77f
12 changed files with 247 additions and 115 deletions

View File

@@ -1,3 +1,4 @@
local core = require "nvim-tree.core"
local utils = require "nvim-tree.utils"
local events = require "nvim-tree.events"
local view = require "nvim-tree.view"
@@ -116,8 +117,9 @@ function M.fn(node)
local function do_remove()
M.remove(node)
if not M.config.filesystem_watchers.enable then
require("nvim-tree.actions.reloaders").reload_explorer()
local explorer = core.get_explorer()
if not M.config.filesystem_watchers.enable and explorer then
explorer:reload_explorer()
end
end