Skip to content

Commit c4b93db

Browse files
committed
fixed #1784 conflict
1 parent a61763f commit c4b93db

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lua/nvim-tree/explorer/filters.lua

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,17 @@ local function git(path, git_status)
2424
end
2525

2626
-- default status to clean
27-
local status = git_status.files[path] or git_status.dirs[path] or " "
27+
local status = git_status.files[path]
28+
status = status or git_status.dirs.direct[path] and git_status.dirs.direct[path][1]
29+
status = status or git_status.dirs.indirect[path] and git_status.dirs.indirect[path][1]
2830

2931
-- filter ignored; overrides clean as they are effectively dirty
3032
if M.config.filter_git_ignored and status == "!!" then
3133
return true
3234
end
3335

3436
-- filter clean
35-
if M.config.filter_git_clean and status == " " then
37+
if M.config.filter_git_clean and not status then
3638
return true
3739
end
3840

0 commit comments

Comments
 (0)