Skip to content

Commit d17389c

Browse files
authored
fix(#2301): do not show git status on grouped dirs when show_on_open_dirs (#2303)
1 parent 1fe3228 commit d17389c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lua/nvim-tree/explorer/node.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function M.update_git_status(node, parent_ignored, status)
5050
end
5151

5252
function M.get_git_status(node)
53-
local git_status = node.git_status
53+
local git_status = node and node.git_status
5454
if not git_status then
5555
-- status doesn't exist
5656
return nil
@@ -67,7 +67,7 @@ function M.get_git_status(node)
6767
end
6868

6969
local status = {}
70-
if not node.open or M.config.git.show_on_open_dirs then
70+
if not require("nvim-tree.lib").get_last_group_node(node).open or M.config.git.show_on_open_dirs then
7171
-- dir is closed or we should show on open_dirs
7272
if git_status.file ~= nil then
7373
table.insert(status, git_status.file)

0 commit comments

Comments
 (0)