fix(ansi): do not print invisible characters

resolves #4594
This commit is contained in:
Jan De Dobbeleer 2024-01-11 07:49:33 +01:00 committed by Jan De Dobbeleer
parent f078d13cca
commit 04b75ec476

View file

@ -400,9 +400,14 @@ func (w *Writer) getAnsiFromColorString(colorString string, isBackground bool) C
}
func (w *Writer) write(s rune) {
if w.invisible {
return
}
if !w.hyperlink {
w.length += runewidth.RuneWidth(s)
}
w.builder.WriteRune(s)
}