Fix #155 - Empty ANSI color code to reset color state

This commit is contained in:
Junegunn Choi committed 2015-03-23 01:24:31 +09:00
1 parent eae53576bd
commit 9d138173be
2 files changed
+11

No files matched your search

+3
View File
@@ -99,6 +99,9 @@ func interpretCode(ansiCode string, prevState *ansiState) *ansiState {
}
ansiCode = ansiCode[2 : len(ansiCode)-1]
if len(ansiCode) == 0 {
init()
}
for _, code := range strings.Split(ansiCode, ";") {
if num, err := strconv.Atoi(code); err == nil {
switch state256 {