File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ local Clipboard = require("nvim-tree.actions.fs.clipboard")
2222local Renderer = require (" nvim-tree.renderer" )
2323
2424local FILTER_REASON = require (" nvim-tree.enum" ).FILTER_REASON
25+ local change_dir = require (" nvim-tree.actions.root.change-dir" )
26+ local find_file = require (" nvim-tree.actions.finders.find-file" )
2527
2628local config
2729
@@ -662,16 +664,16 @@ end
662664--- @param node Node
663665function Explorer :dir_up (node )
664666 if not node or node .name == " .." then
665- require ( " nvim-tree.actions.root.change-dir " ) .fn (" .." )
667+ change_dir .fn (" .." )
666668 else
667669 local cwd = core .get_cwd ()
668670 if cwd == nil then
669671 return
670672 end
671673
672674 local newdir = vim .fn .fnamemodify (utils .path_remove_trailing (cwd ), " :h" )
673- require ( " nvim-tree.actions.root.change-dir " ) .fn (newdir )
674- require ( " nvim-tree.actions.finders.find-file " ) .fn (node .absolute_path )
675+ change_dir .fn (newdir )
676+ find_file .fn (node .absolute_path )
675677 end
676678end
677679
You can’t perform that action at this time.
0 commit comments