Revert "chore: resolve undefined-field"
This reverts commit e82db1c44d.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
local git_utils = require("nvim-tree.git.utils")
|
||||
|
||||
local DirectoryNode = require("nvim-tree.node.directory")
|
||||
|
||||
---@class (exact) DirectoryLinkNode: DirectoryNode
|
||||
@@ -34,24 +36,11 @@ 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
|
||||
-----Update the directory GitStatus of link target and the file status of the link itself
|
||||
-----@param parent_ignored boolean
|
||||
-----@param status table|nil
|
||||
function DirectoryLinkNode:update_git_status(parent_ignored, status)
|
||||
if parent_ignored then
|
||||
self.git_status = {}
|
||||
self.git_status.file = "!!"
|
||||
elseif status then
|
||||
self.git_status = {}
|
||||
self.git_status.file = status.files and (status.files[self.link_to] or status.files[self.absolute_path])
|
||||
if status.dirs then
|
||||
self.git_status.dir = {}
|
||||
self.git_status.dir.direct = status.dirs.direct and status.dirs.direct[self.absolute_path]
|
||||
self.git_status.dir.indirect = status.dirs.indirect and status.dirs.indirect[self.absolute_path]
|
||||
end
|
||||
else
|
||||
self.git_status = nil
|
||||
end
|
||||
self.git_status = git_utils.git_status_dir(parent_ignored, status, self.link_to, self.absolute_path)
|
||||
end
|
||||
|
||||
---Create a sanitized partial copy of a node, populating children recursively.
|
||||
|
||||
Reference in New Issue
Block a user