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 1f041c3 commit bed7a07Copy full SHA for bed7a07
lua/nvim-tree/buffers.lua
@@ -26,12 +26,26 @@ end
26
---@param node Node
27
---@return boolean
28
function M.is_modified(node)
29
+ if not M.config.modified.enable then
30
+ return false
31
+ end
32
+
33
+ if not M._modified[node.absolute_path] then
34
35
36
37
local dir = node:as(DirectoryNode)
- return node
- and M.config.modified.enable
- and M._modified[node.absolute_path]
- and (not dir or M.config.modified.show_on_dirs)
- and (not (dir and dir.open) or M.config.modified.show_on_open_dirs)
38
+ if dir then
39
+ if not M.config.modified.show_on_dirs then
40
41
42
43
+ if dir.open and not M.config.modified.show_on_open_dirs then
44
45
46
47
48
+ return true
49
end
50
51
---A buffer exists for the node's absolute path
0 commit comments