fix another broken case

pull/117/head
stephen cheng 6 years ago
parent e91e46ac10
commit 4aeba51ce3

@ -361,13 +361,11 @@ func printWithStyle(screen tcell.Screen, text string, x, y, maxWidth, align int,
width += w
start = index
}
if len(runes) > 0 {
for runewidth.RuneWidth(runes[start]) == 0 && start < len(runes) {
if len(runes) > 0 && start < len(runes) {
for runewidth.RuneWidth(runes[start]) == 0 {
start++
}
}
return printWithStyle(screen, substring(start, len(runes)), x+maxWidth-width, y, width, AlignLeft, style)
} else if align == AlignCenter {
width := runewidth.StringWidth(strippedText)

Loading…
Cancel
Save