We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bb23127 commit d19f68bCopy full SHA for d19f68b
lua/nvim-tree/buffers.lua
@@ -26,11 +26,12 @@ end
26
---@param node Node
27
---@return boolean
28
function M.is_modified(node)
29
+ local dir = node:as(DirectoryNode)
30
return node
31
and M.config.modified.enable
32
and M._modified[node.absolute_path]
- 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)
+ and (not dir or M.config.modified.show_on_dirs)
34
+ and (not (dir and dir.open) or M.config.modified.show_on_open_dirs)
35
end
36
37
---A buffer exists for the node's absolute path
0 commit comments