File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
lua/nvim-tree/actions/tree/modifiers Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ local function expand_until_max_or_empty(expansion_count, node)
42
42
return not should_halt and node .nodes and not node .open and not should_exclude
43
43
end
44
44
45
- local function gen_iterator (should_expand_fn )
45
+ local function gen_iterator (should_expand )
46
46
local expansion_count = 0
47
47
48
48
return function (parent )
@@ -52,16 +52,15 @@ local function gen_iterator(should_expand_fn)
52
52
Iterator .builder ({ parent })
53
53
:hidden ()
54
54
:applier (function (node )
55
- local should_expand = should_expand_fn (expansion_count , node , populate_node )
56
- if should_expand then
55
+ if should_expand (expansion_count , node , populate_node ) then
57
56
expansion_count = expansion_count + 1
58
57
populate_node (node )
59
58
node = lib .get_last_group_node (node )
60
59
node .open = true
61
60
end
62
61
end )
63
62
:recursor (function (node )
64
- local should_recurse = should_expand_fn (expansion_count - 1 , node , populate_node )
63
+ local should_recurse = should_expand (expansion_count - 1 , node , populate_node )
65
64
return expansion_count < M .MAX_FOLDER_DISCOVERY and (should_recurse and node .open and node .nodes )
66
65
end )
67
66
:iterate ()
You can’t perform that action at this time.
0 commit comments