Skip to content

Commit

Permalink
Fix branch name alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
muesli committed Sep 4, 2021
1 parent 8bcdaf7 commit 01954c0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion branch.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ func printBranch(branch Branch, maxWidth int) {
genericStyle := lipgloss.NewStyle().
Foreground(lipgloss.Color(theme.colorGray))
numberStyle := lipgloss.NewStyle().
Foreground(lipgloss.Color(theme.colorBlue)).Width(maxWidth)
authorStyle := lipgloss.NewStyle().
Foreground(lipgloss.Color(theme.colorBlue))
timeStyle := lipgloss.NewStyle().
Foreground(lipgloss.Color(theme.colorGreen)).Width(8).Align(lipgloss.Right)
Expand All @@ -68,7 +70,7 @@ func printBranch(branch Branch, maxWidth int) {
s += genericStyle.Render(" ")
s += timeStyle.Render(ago(branch.LastCommit.CommittedAt))
s += genericStyle.Render(" ")
s += numberStyle.Render(branch.LastCommit.Author)
s += authorStyle.Render(branch.LastCommit.Author)

fmt.Println(s)
}
Expand Down

0 comments on commit 01954c0

Please sign in to comment.