chore: resolve undefined-field
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
local DirectoryNode = require("nvim-tree.node.directory")
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
---@type table<string, boolean> record of which file is modified
|
---@type table<string, boolean> record of which file is modified
|
||||||
@@ -27,8 +29,8 @@ function M.is_modified(node)
|
|||||||
return node
|
return node
|
||||||
and M.config.modified.enable
|
and M.config.modified.enable
|
||||||
and M._modified[node.absolute_path]
|
and M._modified[node.absolute_path]
|
||||||
and (not node.nodes or M.config.modified.show_on_dirs)
|
and (not node:is(DirectoryNode) or M.config.modified.show_on_dirs)
|
||||||
and (not node.open or M.config.modified.show_on_open_dirs)
|
and (not (node:is(DirectoryNode) and node.open) or M.config.modified.show_on_open_dirs)
|
||||||
end
|
end
|
||||||
|
|
||||||
---A buffer exists for the node's absolute path
|
---A buffer exists for the node's absolute path
|
||||||
|
|||||||
@@ -321,7 +321,7 @@ function Explorer:refresh_parent_nodes_for_path(path)
|
|||||||
local project = git.get_project(toplevel) or {}
|
local project = git.get_project(toplevel) or {}
|
||||||
|
|
||||||
self:reload(node, project)
|
self:reload(node, project)
|
||||||
node:update_parent_statuses(project, toplevel)
|
git.update_parent_statuses(node, project, toplevel)
|
||||||
end
|
end
|
||||||
|
|
||||||
log.profile_end(profile)
|
log.profile_end(profile)
|
||||||
|
|||||||
Reference in New Issue
Block a user