diff options
author | Yang Zhang <yang_zhang@iapcm.ac.cn> | 2018-12-31 09:02:35 +0800 |
---|---|---|
committer | Yang Zhang <yang_zhang@iapcm.ac.cn> | 2018-12-31 09:02:35 +0800 |
commit | 99bc0c140a5023ff92d523cbdc086df18dca6379 (patch) | |
tree | 5293e08b84755b415a7876f47cd2ee3ba6369890 /util/text | |
parent | a0ae5fc5349063fb9b0a3de04be555b3757c1f4b (diff) | |
download | git-bug-99bc0c140a5023ff92d523cbdc086df18dca6379.tar.gz |
Fix megacheck warnings
Diffstat (limited to 'util/text')
-rw-r--r-- | util/text/text.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/util/text/text.go b/util/text/text.go index f8062bc6..f2a0877e 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 { |