refactor(#2826): View is an Explorer member

This commit is contained in:
Alexander Courtis
2025-04-21 12:02:19 +10:00
parent 0eb21f66f7
commit 44cb3d2f0a
21 changed files with 170 additions and 114 deletions

View File

@@ -1,5 +1,4 @@
local log = require("nvim-tree.log")
local view = require("nvim-tree.view")
local utils = require("nvim-tree.utils")
local core = require("nvim-tree.core")
@@ -14,7 +13,7 @@ local running = {}
---@param path string relative or absolute
function M.fn(path)
local explorer = core.get_explorer()
if not explorer or not view.View:is_visible() then
if not explorer or not explorer.view:is_visible() then
return
end
@@ -84,9 +83,9 @@ function M.fn(path)
end)
:iterate()
if found and view.View:is_visible() then
if found and explorer.view:is_visible() then
explorer.renderer:draw()
view.View:set_cursor({ line, 0 })
explorer.view:set_cursor({ line, 0 })
end
running[path_real] = false