aboutsummaryrefslogtreecommitdiffstats
path: root/util/text/text.go
diff options
context:
space:
mode:
Diffstat (limited to 'util/text/text.go')
-rw-r--r--util/text/text.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/util/text/text.go b/util/text/text.go
index f8910c2e..ee9d278c 100644
--- a/util/text/text.go
+++ b/util/text/text.go
@@ -100,9 +100,9 @@ func wrapText(s string, w int) string {
word += string(r)
}
}
- // The text may end without newlines, ensure flushing it or we can lose the
- // last word.
- flushWord()
+ // The text may end without newlines, ensure flushing it or we can lose the
+ // last word.
+ flushWord()
return out
}
@@ -113,12 +113,12 @@ func wordLen(word string) int {
length := 0
escape := false
- for _, char := range []rune(word) {
+ for _, char := range word {
if char == '\x1b' {
escape = true
}
if !escape {
- length += runewidth.RuneWidth(char)
+ length += runewidth.RuneWidth(rune(char))
}
if char == 'm' {
escape = false