From 99bc0c140a5023ff92d523cbdc086df18dca6379 Mon Sep 17 00:00:00 2001 From: Yang Zhang Date: Mon, 31 Dec 2018 09:02:35 +0800 Subject: [PATCH] Fix megacheck warnings --- util/text/text.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/text/text.go b/util/text/text.go index f8062bc690d1f6724f8bac55b102f6ea3f258646..f2a0877e0eb821fb24bb1967e878f93da7d614d1 100644 --- a/util/text/text.go +++ b/util/text/text.go @@ -88,7 +88,7 @@ func replayTermEscape(s string, sequence []EscapeItem) string { currPos := 0 currItem := 0 - for _, r := range []rune(s) { + for _, r := range s { if currItem < len(sequence) && currPos == sequence[currItem].pos { if r == '\n' { out += "\n" + sequence[currItem].item @@ -156,7 +156,7 @@ func softwrapLine(s string, w int) string { word = "" wordType = NONE } - for _, r := range []rune(newStr) { + for _, r := range newStr { // A WIDE_CHAR itself constitutes a group. thisType := runeType(r) if thisType == WIDE_CHAR {