Skip to content

Commit

Permalink
Reserve a proper amount of space for wide characters when auto-aligni…
Browse files Browse the repository at this point in the history
…ng (#138)
  • Loading branch information
kimtore committed Dec 24, 2023
1 parent 6cb49ef commit 6f0282a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion widgets/topbar.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func pieceTextWidth(piece *topbar.PieceStatement) int {
width := 0
for _, fragment := range piece.Fragments {
s, _ := fragment.Instance.Text()
width += len(s)
width += runewidth.StringWidth(s)
}
return width
}
Expand Down

0 comments on commit 6f0282a

Please sign in to comment.