Always prepend ANSI reset code before re-assembling tokens

This commit is contained in:
Junegunn Choi
2019-03-07 10:47:09 +09:00
parent e00e7e1e56
commit 85c1f8a9e0
4 changed files with 9 additions and 7 deletions

View File

@@ -34,7 +34,7 @@ func (s *ansiState) equals(t *ansiState) bool {
func (s *ansiState) ToString() string {
if !s.colored() {
return "\x1b[m"
return ""
}
ret := ""