summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2017-08-17 19:12:44 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2017-08-17 19:12:44 +0900
commit8d23646fe6a7cc404824a6c88b3fe373fe38fb60 (patch)
tree390f968c400a0a1e39bf1dd231a5ac06fd13995d
parent656963e01805efccc788e7e2d83a4bcfaa01ee7b (diff)
Revert "Short-circuit ANSI processing if no ANSI codes are found"
-rw-r--r--src/ansi.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/ansi.go b/src/ansi.go
index 70ec5609..5856bd57 100644
--- a/src/ansi.go
+++ b/src/ansi.go
@@ -74,11 +74,8 @@ func extractColor(str string, state *ansiState, proc func(string, *ansiState) bo
for idx := 0; idx < len(str); {
idx += findAnsiStart(str[idx:])
+ // No sign of ANSI code
if idx == len(str) {
- // No sign of ANSI code
- if len(offsets) == 0 {
- return str, nil, state
- }
break
}