diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2021-03-31 22:39:55 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2021-04-02 11:00:15 +1100 |
commit | 54910fdb76f8a699d2cfb96459b75b60485fd3f7 (patch) | |
tree | c015840a1338db2976058f080346821d7f6dfc4b /pkg/gui/presentation | |
parent | 332a3c4cbfd263c34d5f53dd971701d2ca69ab4e (diff) |
refactor
Diffstat (limited to 'pkg/gui/presentation')
-rw-r--r-- | pkg/gui/presentation/commit_files.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/gui/presentation/commit_files.go b/pkg/gui/presentation/commit_files.go index 2e87e61c2..bf8b6243b 100644 --- a/pkg/gui/presentation/commit_files.go +++ b/pkg/gui/presentation/commit_files.go @@ -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: |