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:
parent
7555ae3b5c
commit
3ebb299350
@ -72,9 +72,13 @@ func (widget *Widget) formatChanges(data []string) string {
|
|||||||
str := ""
|
str := ""
|
||||||
str = str + " [red]Changed Files[white]\n"
|
str = str + " [red]Changed Files[white]\n"
|
||||||
|
|
||||||
|
if len(data) == 1 {
|
||||||
|
str = str + " [grey]none[white]\n"
|
||||||
|
} else {
|
||||||
for _, line := range data {
|
for _, line := range data {
|
||||||
str = str + widget.formatChange(line)
|
str = str + widget.formatChange(line)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return str
|
return str
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user