1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-31 14:24:25 +03:00

more file tree improvements

This commit is contained in:
Jesse Duffield
2021-03-20 13:49:43 +11:00
parent cd0532b4d6
commit c27cea6f30
4 changed files with 29 additions and 47 deletions

View File

@ -13,24 +13,6 @@ type StatusLineNode struct {
Collapsed bool
}
func (s *StatusLineNode) GetShortStatus() string {
// need to see if any child has unstaged changes.
if s.IsLeaf() {
return s.File.ShortStatus
}
firstChar := " "
secondChar := " "
if s.GetHasStagedChanges() {
firstChar = "M"
}
if s.GetHasUnstagedChanges() {
secondChar = "M"
}
return firstChar + secondChar
}
func (s *StatusLineNode) GetHasUnstagedChanges() bool {
if s.IsLeaf() {
return s.File.HasUnstagedChanges