@@ -2,6 +2,7 @@ local utils = require("nvim-tree.utils")
22local view = require (" nvim-tree.view" )
33local core = require (" nvim-tree.core" )
44local lib = require (" nvim-tree.lib" )
5+ local explorer_node = require (" nvim-tree.explorer.node" )
56local diagnostics = require (" nvim-tree.diagnostics" )
67
78local M = {}
@@ -15,7 +16,7 @@ local MAX_DEPTH = 100
1516--- @return boolean
1617local function status_is_valid (node , what , skip_gitignored )
1718 if what == " git" then
18- local git_status = node : get_git_status ()
19+ local git_status = explorer_node . get_git_status (node )
1920 return git_status ~= nil and (not skip_gitignored or git_status [1 ] ~= " !!" )
2021 elseif what == " diag" then
2122 local diag_status = diagnostics .get_diag_status (node )
@@ -74,7 +75,7 @@ local function expand_node(node)
7475 if not node .open then
7576 -- Expand the node.
7677 -- Should never collapse since we checked open.
77- node : expand_or_collapse ()
78+ lib . expand_or_collapse (node )
7879 end
7980end
8081
@@ -97,7 +98,7 @@ local function move_next_recursive(what, skip_gitignored)
9798 valid = status_is_valid (node_init , what , skip_gitignored )
9899 end
99100 if node_init .nodes ~= nil and valid and not node_init .open then
100- node_init : expand_or_collapse ()
101+ lib . expand_or_collapse (node_init )
101102 end
102103
103104 move (" next" , what , skip_gitignored )
0 commit comments