refacto: move set_index_and_redraw -> actions.find-file.fn

This commit is contained in:
kiyan
2022-02-06 16:32:44 +01:00
parent 23c95a674f
commit 7829d7c7cf
5 changed files with 76 additions and 58 deletions

View File

@@ -2,10 +2,13 @@ local git = require "nvim-tree.git"
local diagnostics = require "nvim-tree.diagnostics"
local view = require "nvim-tree.view"
local explorer_module = require'nvim-tree.explorer'
local get_explorer = function() return require "nvim-tree.lib".Tree end
local M = {}
local function get_explorer()
return require "nvim-tree.lib".Tree
end
local function refresh_nodes(node, projects)
local project_root = git.get_project_root(node.absolute_path or node.cwd)
explorer_module.refresh(node.nodes, node.absolute_path or node.cwd, node, projects[project_root] or {})