1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-17 00:18:05 +02:00
This commit is contained in:
Jesse Duffield
2021-03-31 22:39:55 +11:00
parent 332a3c4cbf
commit 54910fdb76
9 changed files with 76 additions and 35 deletions

View File

@ -8,7 +8,7 @@ import (
"github.com/jesseduffield/lazygit/pkg/utils"
)
func GetCommitFileLine(name string, diffName string, commitFile *models.CommitFile) string {
func GetCommitFileLine(name string, diffName string, commitFile *models.CommitFile, patchManager *patch.PatchManager) string {
yellow := color.New(color.FgYellow)
green := color.New(color.FgGreen)
defaultColor := color.New(theme.DefaultTextColor)
@ -22,7 +22,8 @@ func GetCommitFileLine(name string, diffName string, commitFile *models.CommitFi
if diffName == name {
colour = diffTerminalColor
} else if commitFile != nil {
switch commitFile.PatchStatus {
status := patchManager.GetFileStatus(commitFile.Name)
switch status {
case patch.UNSELECTED:
colour = defaultColor
case patch.WHOLE: