summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ansi.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ansi.go b/src/ansi.go
index 5856bd57..70ec5609 100644
--- a/src/ansi.go
+++ b/src/ansi.go
@@ -74,8 +74,11 @@ 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
}