diff --git a/lua/nvim-tree/explorer/filters.lua b/lua/nvim-tree/explorer/filters.lua index c5701dea..8af47e1f 100644 --- a/lua/nvim-tree/explorer/filters.lua +++ b/lua/nvim-tree/explorer/filters.lua @@ -24,7 +24,9 @@ local function git(path, git_status) end -- default status to clean - local status = git_status.files[path] or git_status.dirs[path] or " " + local status = git_status.files[path] + status = status or git_status.dirs.direct[path] and git_status.dirs.direct[path][1] + status = status or git_status.dirs.indirect[path] and git_status.dirs.indirect[path][1] -- filter ignored; overrides clean as they are effectively dirty if M.config.filter_git_ignored and status == "!!" then @@ -32,7 +34,7 @@ local function git(path, git_status) end -- filter clean - if M.config.filter_git_clean and status == " " then + if M.config.filter_git_clean and not status then return true end