* Reapply "refactor(#2871, #2886): multi instance: node classes created (#2916)"
This reverts commit 50e919426a.
* fix(#2945): stack overflow on api.git.reload or fugitive event
This commit is contained in:
committed by
GitHub
parent
50e919426a
commit
5ad87620ec
@@ -1,7 +1,6 @@
|
||||
local view = require("nvim-tree.view")
|
||||
local utils = require("nvim-tree.utils")
|
||||
local core = require("nvim-tree.core")
|
||||
local lib = require("nvim-tree.lib")
|
||||
|
||||
local M = {}
|
||||
|
||||
@@ -12,7 +11,7 @@ function M.fn(should_close)
|
||||
|
||||
return function(node)
|
||||
local explorer = core.get_explorer()
|
||||
node = lib.get_last_group_node(node)
|
||||
node = node:last_group_node()
|
||||
if should_close and node.open then
|
||||
node.open = false
|
||||
if explorer then
|
||||
@@ -21,7 +20,7 @@ function M.fn(should_close)
|
||||
return
|
||||
end
|
||||
|
||||
local parent = utils.get_parent_of_group(node).parent
|
||||
local parent = node:get_parent_of_group().parent
|
||||
|
||||
if not parent or not parent.parent then
|
||||
return view.set_cursor({ 1, 0 })
|
||||
|
||||
Reference in New Issue
Block a user