1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Display none when no git files

This commit is contained in:
Chris Cummer 2018-04-02 22:10:20 -07:00 committed by Chris Cummer
parent 7555ae3b5c
commit 3ebb299350

View File

@ -72,8 +72,12 @@ func (widget *Widget) formatChanges(data []string) string {
str := ""
str = str + " [red]Changed Files[white]\n"
for _, line := range data {
str = str + widget.formatChange(line)
if len(data) == 1 {
str = str + " [grey]none[white]\n"
} else {
for _, line := range data {
str = str + widget.formatChange(line)
}
}
return str