mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-03-05 20:49:04 -08:00
refactor: do not render empty string
This commit is contained in:
parent
b05a4573e7
commit
3bc9448be2
|
@ -108,6 +108,9 @@ func (a *AnsiColor) writeAndRemoveText(background, foreground, text, textToRemov
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *AnsiColor) write(background, foreground, text string) {
|
func (a *AnsiColor) write(background, foreground, text string) {
|
||||||
|
if len(text) == 0 {
|
||||||
|
return
|
||||||
|
}
|
||||||
text = a.ansi.escapeText(text)
|
text = a.ansi.escapeText(text)
|
||||||
text = a.ansi.formatText(text)
|
text = a.ansi.formatText(text)
|
||||||
text = a.ansi.generateHyperlink(text)
|
text = a.ansi.generateHyperlink(text)
|
||||||
|
|
Loading…
Reference in a new issue