Minor refactorings

This commit is contained in:
Junegunn Choi
2017-08-26 03:24:42 +09:00
parent 329de8f416
commit af809c9661
4 changed files with 4 additions and 4 deletions

View File

@@ -79,7 +79,7 @@ func extractColor(str string, state *ansiState, proc func(string, *ansiState) bo
// Make sure that we found an ANSI code
offset := ansiRegex.FindStringIndex(str[idx:])
if offset == nil {
if len(offset) < 2 {
idx++
continue
}