diff options
| author | ewy <ewy0@protonmail.com> | 2026-04-17 00:06:44 +0200 |
|---|---|---|
| committer | ewy <ewy0@protonmail.com> | 2026-04-17 00:06:44 +0200 |
| commit | 6910286edfd3d488800b61ed0ac379fcd6b1fd07 (patch) | |
| tree | ff8ffdc0643c6e178267f9907ca970019d748dfb /menu | |
| parent | 809b28e3de2ea1bcaecc44a0872df26aa22b3ba2 (diff) | |
add "clean" label
Diffstat (limited to 'menu')
| -rw-r--r-- | menu/source.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/menu/source.go b/menu/source.go index 913c1ce..68152fa 100644 --- a/menu/source.go +++ b/menu/source.go @@ -107,9 +107,16 @@ func Git(info *model.GitInfo) string { if info.Insertions > 0 { parts = append(parts, GitAddStyle.Render("+"+strconv.Itoa(info.Insertions))) + } + if info.Deletions > 0 { parts = append(parts, GitRemoveStyle.Render("-"+strconv.Itoa(info.Deletions))) + } + if info.Changes > 0 { parts = append(parts, GitChangeStyle.Render("~"+strconv.Itoa(info.Changes))) } + if info.Changes == 0 && info.Deletions == 0 && info.Insertions == 0 { + parts = append(parts, GitAddStyle.Render("clean")) + } return GitInfoStyle.Render(lipgloss.JoinHorizontal(lipgloss.Left, parts..., |
