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 width += w
start = index start = index
} }
if len(runes) > 0 && start < len(runes) {
if len(runes) > 0 { for runewidth.RuneWidth(runes[start]) == 0 {
for runewidth.RuneWidth(runes[start]) == 0 && start < len(runes) {
start++ start++
} }
} }
return printWithStyle(screen, substring(start, len(runes)), x+maxWidth-width, y, width, AlignLeft, style) return printWithStyle(screen, substring(start, len(runes)), x+maxWidth-width, y, width, AlignLeft, style)
} else if align == AlignCenter { } else if align == AlignCenter {
width := runewidth.StringWidth(strippedText) width := runewidth.StringWidth(strippedText)

Loading…
Cancel
Save