@@ -7,7 +7,6 @@ local live_filter = require "nvim-tree.live-filter"
7
7
local git = require " nvim-tree.git"
8
8
local log = require " nvim-tree.log"
9
9
10
- local NodeIterator = require " nvim-tree.iterators.node-iterator"
11
10
local Watcher = require " nvim-tree.watcher"
12
11
13
12
local M = {}
@@ -178,44 +177,6 @@ function M.refresh_node(node, callback)
178
177
end
179
178
end
180
179
181
- --- Refresh contents and git status for all nodes to a path: actual directory and links
182
- --- @param path string absolute path
183
- function M .refresh_nodes_for_path (path )
184
- local explorer = require (" nvim-tree.core" ).get_explorer ()
185
- if not explorer then
186
- return
187
- end
188
-
189
- local profile = log .profile_start (" refresh_nodes_for_path %s" , path )
190
-
191
- -- avoids cycles
192
- local absolute_paths_refreshed = {}
193
-
194
- NodeIterator .builder ({ explorer })
195
- :hidden ()
196
- :recursor (function (node )
197
- if node .group_next then
198
- return { node .group_next }
199
- end
200
- if node .nodes then
201
- return node .nodes
202
- end
203
- end )
204
- :applier (function (node )
205
- local abs_contains = node .absolute_path and path :find (node .absolute_path , 1 , true ) == 1
206
- local link_contains = node .link_to and path :find (node .link_to , 1 , true ) == 1
207
- if abs_contains or link_contains then
208
- if not absolute_paths_refreshed [node .absolute_path ] then
209
- absolute_paths_refreshed [node .absolute_path ] = true
210
- M .refresh_node (node )
211
- end
212
- end
213
- end )
214
- :iterate ()
215
-
216
- log .profile_end (profile )
217
- end
218
-
219
180
function M .setup (opts )
220
181
M .config = opts .renderer
221
182
end
0 commit comments