Revert "Short-circuit ANSI processing if no ANSI codes are found"

This reverts commit 656963e018.
This commit is contained in:
Junegunn Choi 2017-08-17 19:12:44 +09:00
parent 656963e018
commit 8d23646fe6
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

View File

@ -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
}