File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
lua/nvim-tree/actions/tree/modifiers Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ local function limit_folder_discovery(should_descend)
33
33
return function (expansion_count , node )
34
34
local should_halt = expansion_count >= M .MAX_FOLDER_DISCOVERY
35
35
if should_halt then
36
+ notify .warn (" expansion iteration was halted after " .. M .MAX_FOLDER_DISCOVERY .. " discovered folders" )
36
37
return false
37
38
end
38
39
@@ -121,10 +122,6 @@ local function gen_iterator(should_descend)
121
122
return nil
122
123
end )
123
124
:iterate ()
124
-
125
- if expansion_count >= M .MAX_FOLDER_DISCOVERY then
126
- return true
127
- end
128
125
end
129
126
end
130
127
@@ -135,9 +132,7 @@ local function expand_node(node, expand_opts)
135
132
return
136
133
end
137
134
local descend_until = limit_folder_discovery ((expand_opts and expand_opts .expand_until ) or descend_until_empty )
138
- if gen_iterator (descend_until )(node ) then
139
- notify .warn (" expansion iteration was halted after " .. M .MAX_FOLDER_DISCOVERY .. " discovered folders" )
140
- end
135
+ gen_iterator (descend_until )(node )
141
136
142
137
local explorer = core .get_explorer ()
143
138
if explorer then
You can’t perform that action at this time.
0 commit comments