forked from tslocum/cview
Handle ansi code 39 and 49
39 is apparently the "default foreground color" 49 is apparently the "default background color"tablepad
parent
6e548abb6b
commit
9aa08ad7c7
4
ansi.go
4
ansi.go
|
@ -145,9 +145,13 @@ func (a *ansi) Write(text []byte) (int, error) {
|
|||
case "30", "31", "32", "33", "34", "35", "36", "37":
|
||||
colorNumber, _ := strconv.Atoi(field)
|
||||
foreground = lookupColor(colorNumber-30, false)
|
||||
case "39":
|
||||
foreground = "default"
|
||||
case "40", "41", "42", "43", "44", "45", "46", "47":
|
||||
colorNumber, _ := strconv.Atoi(field)
|
||||
background = lookupColor(colorNumber-40, false)
|
||||
case "49":
|
||||
background = "default"
|
||||
case "90", "91", "92", "93", "94", "95", "96", "97":
|
||||
colorNumber, _ := strconv.Atoi(field)
|
||||
foreground = lookupColor(colorNumber-90, true)
|
||||
|
|
Loading…
Reference in New Issue