Revert "refactor(#2871, #2886): multi instance: node classes created (#2916)"

This reverts commit 38aac09151.
This commit is contained in:
Alexander Courtis
2024-10-08 18:07:47 +11:00
parent 010ae0365a
commit 50e919426a
43 changed files with 742 additions and 835 deletions

View File

@@ -138,7 +138,7 @@ Api.tree.change_root_to_node = wrap_node(function(node)
if node.name == ".." then
actions.root.change_dir.fn("..")
elseif node.nodes ~= nil then
actions.root.change_dir.fn(node:last_group_node().absolute_path)
actions.root.change_dir.fn(lib.get_last_group_node(node).absolute_path)
end
end)
@@ -198,7 +198,7 @@ Api.fs.copy.basename = wrap_node(wrap_explorer_member("clipboard", "copy_basenam
Api.fs.copy.relative_path = wrap_node(wrap_explorer_member("clipboard", "copy_path"))
---@param mode string
---@param node Node
---@param node table
local function edit(mode, node)
local path = node.absolute_path
if node.link_to and not node.nodes then
@@ -214,7 +214,7 @@ local function open_or_expand_or_dir_up(mode, toggle_group)
if node.name == ".." then
actions.root.change_dir.fn("..")
elseif node.nodes then
node:expand_or_collapse(toggle_group)
lib.expand_or_collapse(node, toggle_group)
elseif not toggle_group then
edit(mode, node)
end