Update mauview

Fixes #367
This commit is contained in:
Tulir Asokan
2022-04-17 23:54:40 +03:00
parent c45a66bbf9
commit fa79dc0ca1
5 changed files with 18 additions and 26 deletions

View File

@ -41,8 +41,7 @@ func WriteLineColor(screen mauview.Screen, align int, line string, x, y, maxWidt
func WriteLine(screen mauview.Screen, align int, line string, x, y, maxWidth int, style tcell.Style) {
offsetX := 0
if align == mauview.AlignRight {
// TODO is mauview.StringWidth correct here?
offsetX = maxWidth - mauview.StringWidth(line)
offsetX = maxWidth - runewidth.StringWidth(line)
}
if offsetX < 0 {
offsetX = 0