File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -166,9 +166,6 @@ function M.refresh_nodes_for_path(path)
166
166
167
167
local profile = log .profile_start (" refresh_nodes_for_path %s" , path )
168
168
169
- -- avoids cycles
170
- local paths_refreshed = {}
171
-
172
169
NodeIterator .builder ({ explorer })
173
170
:hidden ()
174
171
:recursor (function (node )
@@ -180,13 +177,10 @@ function M.refresh_nodes_for_path(path)
180
177
end
181
178
end )
182
179
:applier (function (node )
183
- local abs_contains = node .absolute_path and path :find ( node .absolute_path , 1 , true ) ~= 1
184
- local link_contains = node .link_to and path :find ( node .link_to , 1 , true ) ~= 1
180
+ local abs_contains = node .absolute_path and path :match ( " ^ " .. node .absolute_path )
181
+ local link_contains = node .link_to and path :match ( " ^ " .. node .link_to )
185
182
if abs_contains or link_contains then
186
- if not paths_refreshed [node .absolute_path ] then
187
- paths_refreshed [node .absolute_path ] = true
188
- M .refresh_node (node )
189
- end
183
+ M .refresh_node (node )
190
184
end
191
185
end )
192
186
:iterate ()
You can’t perform that action at this time.
0 commit comments