Skip to content

Commit 0fe8afe

Browse files
authored
Merge branch 'master' into copy-branch-url-to-clipboard
2 parents ebef925 + dcfdf40 commit 0fe8afe

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

pkg/gui/presentation/branches.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,13 @@ func getBranchDisplayStrings(
145145
}
146146

147147
if divergence != "" {
148-
paddingNeededForDivergence -= utils.StringWidth(utils.Decolorise(coloredName)) - 1
148+
if fullDescription {
149+
// don't right-align the divergence in half or full screen mode, since other fields
150+
// follow in that case and we don't know the width of our column
151+
paddingNeededForDivergence = 1
152+
} else {
153+
paddingNeededForDivergence -= utils.StringWidth(utils.Decolorise(coloredName)) - 1
154+
}
149155
if paddingNeededForDivergence > 0 {
150156
coloredName += strings.Repeat(" ", paddingNeededForDivergence)
151157
coloredName += style.FgCyan.Sprint(divergence)

0 commit comments

Comments
 (0)