File tree Expand file tree Collapse file tree 1 file changed +19
-5
lines changed Expand file tree Collapse file tree 1 file changed +19
-5
lines changed Original file line number Diff line number Diff line change 26
26
--- @param node Node
27
27
--- @return boolean
28
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
+ return false
35
+ end
36
+
29
37
local dir = node :as (DirectoryNode )
30
- return node
31
- and M .config .modified .enable
32
- and M ._modified [node .absolute_path ]
33
- 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 )
38
+ if dir then
39
+ if not M .config .modified .show_on_dirs then
40
+ return false
41
+ end
42
+
43
+ if dir .open and not M .config .modified .show_on_open_dirs then
44
+ return false
45
+ end
46
+ end
47
+
48
+ return true
35
49
end
36
50
37
51
--- A buffer exists for the node's absolute path
You can’t perform that action at this time.
0 commit comments