chore: move refresh/reloaders into actions.reloaders

This commit is contained in:
kiyan
2022-02-06 16:23:51 +01:00
parent 7b64075bdf
commit 23c95a674f
9 changed files with 84 additions and 73 deletions

View File

@@ -8,7 +8,6 @@ local M = {
}
}
local lib = require'nvim-tree.lib'
local utils = require'nvim-tree.utils'
local events = require'nvim-tree.events'
@@ -64,13 +63,13 @@ function M.fn(node)
if node.nodes ~= nil and not node.link_to then
trash_path(function()
events._dispatch_folder_removed(node.absolute_path)
lib.refresh_tree()
require'nvim-tree.actions.reloaders'.reload_explorer()
end)
else
trash_path(function()
events._dispatch_file_removed(node.absolute_path)
clear_buffer(node.absolute_path)
lib.refresh_tree()
require'nvim-tree.actions.reloaders'.reload_explorer()
end)
end