1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-02-03 13:21:56 +02:00

better way to check if a node is a leaf

This commit is contained in:
Jesse Duffield 2021-03-21 10:47:42 +11:00
parent 2b8302bced
commit 1f7273af23

View File

@ -95,7 +95,7 @@ func (s *FileChangeNode) getIndexForPathAux(path string, collapsedPaths map[stri
}
func (s *FileChangeNode) IsLeaf() bool {
return len(s.Children) == 0
return s.File != nil
}
func (s *FileChangeNode) Size(collapsedPaths map[string]bool) int {