@@ -2,6 +2,7 @@ local utils = require("nvim-tree.utils")
2
2
local view = require (" nvim-tree.view" )
3
3
local core = require (" nvim-tree.core" )
4
4
local lib = require (" nvim-tree.lib" )
5
+ local explorer_node = require (" nvim-tree.explorer.node" )
5
6
local diagnostics = require (" nvim-tree.diagnostics" )
6
7
7
8
local M = {}
@@ -15,7 +16,7 @@ local MAX_DEPTH = 100
15
16
--- @return boolean
16
17
local function status_is_valid (node , what , skip_gitignored )
17
18
if what == " git" then
18
- local git_status = node : get_git_status ()
19
+ local git_status = explorer_node . get_git_status (node )
19
20
return git_status ~= nil and (not skip_gitignored or git_status [1 ] ~= " !!" )
20
21
elseif what == " diag" then
21
22
local diag_status = diagnostics .get_diag_status (node )
@@ -74,7 +75,7 @@ local function expand_node(node)
74
75
if not node .open then
75
76
-- Expand the node.
76
77
-- Should never collapse since we checked open.
77
- node : expand_or_collapse ()
78
+ lib . expand_or_collapse (node )
78
79
end
79
80
end
80
81
@@ -97,7 +98,7 @@ local function move_next_recursive(what, skip_gitignored)
97
98
valid = status_is_valid (node_init , what , skip_gitignored )
98
99
end
99
100
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 )
101
102
end
102
103
103
104
move (" next" , what , skip_gitignored )
0 commit comments