File tree Expand file tree Collapse file tree 6 files changed +282
-290
lines changed Expand file tree Collapse file tree 6 files changed +282
-290
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ local log = require "nvim-tree.log"
22local  view  =  require  " nvim-tree.view" 
33local  utils  =  require  " nvim-tree.utils" 
44local  renderer  =  require  " nvim-tree.renderer" 
5- local  reload  =  require  " nvim-tree.explorer.reload" 
65local  core  =  require  " nvim-tree.core" 
76local  Iterator  =  require  " nvim-tree.iterators.node-iterator" 
87
@@ -13,7 +12,8 @@ local running = {}
1312--- Find a path in the tree, expand it and focus it
1413--- @param  path  string relative or absolute 
1514function  M .fn (path )
16-   if  not  core .get_explorer () or  not  view .is_visible () then 
15+   local  explorer  =  core .get_explorer ()
16+   if  not  explorer  or  not  view .is_visible () then 
1717    return 
1818  end 
1919
@@ -32,7 +32,7 @@ function M.fn(path)
3232
3333  --  refresh the contents of all parents, expanding groups as needed
3434  if  utils .get_node_from_path (path_real ) ==  nil  then 
35-     reload . refresh_parent_nodes_for_path (vim .fn .fnamemodify (path_real , " :h"  ))
35+     explorer : refresh_parent_nodes_for_path (vim .fn .fnamemodify (path_real , " :h"  ))
3636  end 
3737
3838  local  line  =  core .get_nodes_starting_line ()
Original file line number Diff line number Diff line change 11local  git  =  require  " nvim-tree.git" 
22local  view  =  require  " nvim-tree.view" 
33local  renderer  =  require  " nvim-tree.renderer" 
4- local  explorer_module  =  require  " nvim-tree.explorer" 
54local  core  =  require  " nvim-tree.core" 
65local  explorer_node  =  require  " nvim-tree.explorer.node" 
76local  Iterator  =  require  " nvim-tree.iterators.node-iterator" 
87
98local  M  =  {}
109
11- --- @param  node  Explorer | nil 
10+ --- @param  explorer  Explorer | nil 
1211--- @param  projects  table 
13- local  function  refresh_nodes (node , projects )
14-   Iterator .builder ({ node  })
12+ local  function  refresh_nodes (explorer , projects )
13+   Iterator .builder ({ explorer  })
1514    :applier (function (n )
1615      if  n .nodes  then 
1716        local  toplevel  =  git .get_toplevel (n .cwd  or  n .link_to  or  n .absolute_path )
18-         explorer_module .reload (n , projects [toplevel ] or  {})
17+         if  explorer  then 
18+           explorer :reload (n , projects [toplevel ] or  {})
19+         end 
1920      end 
2021    end )
2122    :recursor (function (n )
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ function M.init(foldername)
1616  if  TreeExplorer  then 
1717    TreeExplorer :destroy ()
1818  end 
19-   TreeExplorer  =  explorer . Explorer . new (foldername )
19+   TreeExplorer  =  explorer : new (foldername )
2020  if  not  first_init_done  then 
2121    events ._dispatch_ready ()
2222    first_init_done  =  true 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments