refactor: all usages going through the explorer

This commit is contained in:
Mateusz Russak
2024-07-28 10:16:02 +02:00
parent c6ae2431bc
commit 9deac32a40
7 changed files with 22 additions and 14 deletions

View File

@@ -112,7 +112,10 @@ function M.find_node(nodes, fn)
end)
:iterate()
i = require("nvim-tree.view").is_root_folder_visible() and i or i - 1
i = require("nvim-tree.live-filter").filter and i + 1 or i
local explorer = require("nvim-tree.core").get_explorer()
if explorer and explorer.live_filter.filter then
i = i + 1
end
return node, i
end