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

feat: add stash icon

This commit is contained in:
Ryooooooga
2022-10-14 21:56:01 +09:00
parent 6af0afdb1c
commit d90fedfbf8
2 changed files with 13 additions and 1 deletions

View File

@ -3,6 +3,7 @@ package presentation
import (
"github.com/jesseduffield/generics/slices"
"github.com/jesseduffield/lazygit/pkg/commands/models"
"github.com/jesseduffield/lazygit/pkg/gui/presentation/icons"
"github.com/jesseduffield/lazygit/pkg/theme"
)
@ -19,5 +20,11 @@ func getStashEntryDisplayStrings(s *models.StashEntry, diffed bool) []string {
if diffed {
textStyle = theme.DiffTerminalColor
}
return []string{textStyle.Sprint(s.Name)}
res := make([]string, 0, 2)
if icons.IsIconEnabled() {
res = append(res, textStyle.Sprint(icons.IconForStash(s)))
}
res = append(res, textStyle.Sprint(s.Name))
return res
}