summaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2023-08-12 16:34:04 +1000
committerJesse Duffield <jessedduffield@gmail.com>2023-08-12 16:34:04 +1000
commite6356ce10c0d094db3d3d61847a161c3d708aea1 (patch)
tree0b5f49ee6df8872414b84ccd423353e822681832 /pkg
parentb92da0dc54f0fadf3dfb6ea4cde26186f8e47088 (diff)
Show commit mark before showing extra info
The 'YOU ARE HERE' marking should be shown before we show things like the current tag, otherwise it could be missed
Diffstat (limited to 'pkg')
-rw-r--r--pkg/gui/presentation/commits.go9
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