mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-17 00:18:05 +02:00
better way to check if a node is a leaf
This commit is contained in:
@ -95,7 +95,7 @@ func (s *FileChangeNode) getIndexForPathAux(path string, collapsedPaths map[stri
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *FileChangeNode) IsLeaf() bool {
|
func (s *FileChangeNode) IsLeaf() bool {
|
||||||
return len(s.Children) == 0
|
return s.File != nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *FileChangeNode) Size(collapsedPaths map[string]bool) int {
|
func (s *FileChangeNode) Size(collapsedPaths map[string]bool) int {
|
||||||
|
Reference in New Issue
Block a user