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)
166166
167167 local profile = log .profile_start (" refresh_nodes_for_path %s" , path )
168168
169- -- avoids cycles
170- local paths_refreshed = {}
171-
172169 NodeIterator .builder ({ explorer })
173170 :hidden ()
174171 :recursor (function (node )
@@ -180,13 +177,10 @@ function M.refresh_nodes_for_path(path)
180177 end
181178 end )
182179 :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 )
185182 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 )
190184 end
191185 end )
192186 :iterate ()
You can’t perform that action at this time.
0 commit comments