refactor(#2826): View is an Explorer member
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
local view = require("nvim-tree.view")
|
||||
local utils = require("nvim-tree.utils")
|
||||
|
||||
local DirectoryNode = require("nvim-tree.node.directory")
|
||||
@@ -25,7 +24,7 @@ function M.fn(should_close)
|
||||
local parent = (node:get_parent_of_group() or node).parent
|
||||
|
||||
if not parent or not parent.parent then
|
||||
view.View:set_cursor({ 1, 0 })
|
||||
node.explorer.view:set_cursor({ 1, 0 })
|
||||
return
|
||||
end
|
||||
|
||||
@@ -33,7 +32,7 @@ function M.fn(should_close)
|
||||
return n.absolute_path == parent.absolute_path
|
||||
end)
|
||||
|
||||
view.View:set_cursor({ line + 1, 0 })
|
||||
node.explorer.view:set_cursor({ line + 1, 0 })
|
||||
if should_close then
|
||||
parent.open = false
|
||||
parent.explorer.renderer:draw()
|
||||
|
||||
Reference in New Issue
Block a user