move many autocommands into Explorer

This commit is contained in:
Alexander Courtis
2024-10-21 15:36:21 +11:00
parent e2e6b2b095
commit ff85d8034c
6 changed files with 124 additions and 113 deletions

View File

@@ -32,6 +32,10 @@ function DirectoryLinkNode:create(explorer, parent, absolute_path, link_to, name
return o
end
function DirectoryLinkNode:destroy()
DirectoryNode.destroy(self)
end
-----Update the directory GitStatus of link target and the file status of the link itself
-----@param parent_ignored boolean
-----@param status table|nil

View File

@@ -28,6 +28,10 @@ function FileLinkNode:create(explorer, parent, absolute_path, link_to, name, fs_
return o
end
function FileLinkNode:destroy()
FileNode.destroy(self)
end
-----Update the GitStatus of the target otherwise the link itself
-----@param parent_ignored boolean
-----@param status table|nil

View File

@@ -36,6 +36,10 @@ function FileNode:create(explorer, parent, absolute_path, name, fs_stat)
return o
end
function FileNode:destroy()
Node.destroy(self)
end
---Update the GitStatus of the file
---@param parent_ignored boolean
---@param status table|nil

View File

@@ -23,4 +23,8 @@ function RootNode:is_dotfile()
return false
end
function RootNode:destroy()
DirectoryNode.destroy(self)
end
return RootNode