Skip to content

Commit d631ee1

Browse files
committed
chore: resolve undefined-field
1 parent 868a5ef commit d631ee1

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

lua/nvim-tree/buffers.lua

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
local DirectoryNode = require("nvim-tree.node.directory")
2+
13
local M = {}
24

35
---@type table<string, boolean> record of which file is modified
@@ -27,8 +29,8 @@ function M.is_modified(node)
2729
return node
2830
and M.config.modified.enable
2931
and M._modified[node.absolute_path]
30-
and (not node.nodes or M.config.modified.show_on_dirs)
31-
and (not node.open or M.config.modified.show_on_open_dirs)
32+
and (not node:is(DirectoryNode) or M.config.modified.show_on_dirs)
33+
and (not (node:is(DirectoryNode) and node.open) or M.config.modified.show_on_open_dirs)
3234
end
3335

3436
---A buffer exists for the node's absolute path

lua/nvim-tree/explorer/init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ function Explorer:refresh_parent_nodes_for_path(path)
321321
local project = git.get_project(toplevel) or {}
322322

323323
self:reload(node, project)
324-
node:update_parent_statuses(project, toplevel)
324+
git.update_parent_statuses(node, project, toplevel)
325325
end
326326

327327
log.profile_end(profile)

0 commit comments

Comments
 (0)