mirror of
https://github.com/jesseduffield/lazygit.git
synced 2024-12-02 09:21:40 +02:00
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
This commit is contained in:
parent
b92da0dc54
commit
e6356ce10c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user