diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2023-08-12 16:44:27 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-12 16:44:27 +1000 |
commit | 26989ce0eecbb8509c6951d5d427913498a0d58f (patch) | |
tree | 0b5f49ee6df8872414b84ccd423353e822681832 | |
parent | b92da0dc54f0fadf3dfb6ea4cde26186f8e47088 (diff) | |
parent | e6356ce10c0d094db3d3d61847a161c3d708aea1 (diff) |
Show commit mark before showing extra info (#2928)
-rw-r--r-- | pkg/gui/presentation/commits.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pkg/gui/presentation/commits.go b/pkg/gui/presentation/commits.go index f5915a7ee..6661e9d30 100644 --- a/pkg/gui/presentation/commits.go +++ b/pkg/gui/presentation/commits.go @@ -341,16 +341,17 @@ func displayCommit( name = emoji.Sprint(name) } + mark := "" if isYouAreHereCommit { color := lo.Ternary(commit.Action == models.ActionConflict, style.FgRed, style.FgYellow) youAreHere := color.Sprintf("<-- %s ---", common.Tr.YouAreHere) - name = fmt.Sprintf("%s %s", youAreHere, name) + mark = fmt.Sprintf("%s ", youAreHere) } else if isMarkedBaseCommit { rebaseFromHere := style.FgYellow.Sprint(common.Tr.MarkedCommitMarker) - name = fmt.Sprintf("%s %s", rebaseFromHere, name) + mark = fmt.Sprintf("%s ", rebaseFromHere) } else if !willBeRebased { willBeRebased := style.FgYellow.Sprint("✓") - name = fmt.Sprintf("%s %s", willBeRebased, name) + mark = fmt.Sprintf("%s ", willBeRebased) } authorFunc := authors.ShortAuthor @@ -373,7 +374,7 @@ func displayCommit( cols, actionString, authorFunc(commit.AuthorName), - graphLine+tagString+theme.DefaultTextColor.Sprint(name), + graphLine+mark+tagString+theme.DefaultTextColor.Sprint(name), ) return cols |