diff options
author | AzraelSec <me@azraelsec.sh> | 2023-12-20 20:51:39 +0100 |
---|---|---|
committer | Stefan Haller <stefan@haller-berlin.de> | 2023-12-27 11:21:49 +0100 |
commit | bc330b8ff3ef7533bc1f96c7d2b309eaf94adf61 (patch) | |
tree | a55d85c53fae10731c34e5d9ea16945d5ef948f6 /pkg/gui/presentation | |
parent | 7f36494eb2710588dc08b2dd110608f90764fd87 (diff) |
feat: add age on stash lines
Diffstat (limited to 'pkg/gui/presentation')
-rw-r--r-- | pkg/gui/presentation/stash_entries.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg/gui/presentation/stash_entries.go b/pkg/gui/presentation/stash_entries.go index c45e91982..c4a1a4de1 100644 --- a/pkg/gui/presentation/stash_entries.go +++ b/pkg/gui/presentation/stash_entries.go @@ -3,6 +3,7 @@ package presentation import ( "github.com/jesseduffield/lazygit/pkg/commands/models" "github.com/jesseduffield/lazygit/pkg/gui/presentation/icons" + "github.com/jesseduffield/lazygit/pkg/gui/style" "github.com/jesseduffield/lazygit/pkg/theme" "github.com/samber/lo" ) @@ -21,10 +22,13 @@ func getStashEntryDisplayStrings(s *models.StashEntry, diffed bool) []string { textStyle = theme.DiffTerminalColor } - res := make([]string, 0, 2) + res := make([]string, 0, 3) + res = append(res, style.FgCyan.Sprint(s.Recency)) + if icons.IsIconEnabled() { res = append(res, textStyle.Sprint(icons.IconForStash(s))) } + res = append(res, textStyle.Sprint(s.Name)) return res } |