1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-15 00:15:32 +02:00

better handling of there being no commit files

This commit is contained in:
Jesse Duffield
2020-08-23 14:43:48 +10:00
parent 2915134007
commit 4fb52ce2ab
4 changed files with 13 additions and 9 deletions

View File

@ -9,6 +9,10 @@ import (
)
func GetCommitFileListDisplayStrings(commitFiles []*commands.CommitFile, diffName string) [][]string {
if len(commitFiles) == 0 {
return [][]string{{utils.ColoredString("(none)", color.FgRed)}}
}
lines := make([][]string, len(commitFiles))
for i := range commitFiles {
@ -54,6 +58,6 @@ func getColorForChangeStatus(changeStatus string) color.Attribute {
case "T":
return color.FgMagenta
default:
return color.FgWhite
return theme.DefaultTextColor
}
}