Don't indent line if all we're outputting is ANSI sequences

This commit is contained in:
Christian Muehlhaeuser
2019-12-04 08:56:15 +01:00
parent f7244397d2
commit 550c0bdbd5
3 changed files with 30 additions and 18 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ func (w *PaddingWriter) Write(b []byte) (int, error) {
// ANSI escape sequence
w.ansi = true
} else if w.ansi {
if (c >= 0x40 && c <= 0x5a) || (c >= 0x61 && c <= 0x7a) {
if (c >= 0x41 && c <= 0x5a) || (c >= 0x61 && c <= 0x7a) {
// ANSI sequence terminated
w.ansi = false
w.lineLen--