mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-11-10 04:54:03 -08:00
fix: do not print invisible text
This commit is contained in:
parent
f860c8cb55
commit
3d4b3c891c
|
@ -97,7 +97,7 @@ func (a *AnsiColor) getAnsiFromColorString(colorString string, isBackground bool
|
||||||
|
|
||||||
func (a *AnsiColor) writeColoredText(background, foreground, text string) {
|
func (a *AnsiColor) writeColoredText(background, foreground, text string) {
|
||||||
// Avoid emitting empty strings with color codes
|
// Avoid emitting empty strings with color codes
|
||||||
if text == "" {
|
if text == "" || (foreground == Transparent && background == Transparent) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// default to white fg if empty, empty backgrond is supported
|
// default to white fg if empty, empty backgrond is supported
|
||||||
|
|
Loading…
Reference in a new issue