fix: do not render empty/whitespace segments

This commit is contained in:
Jan De Dobbeleer 2022-02-02 11:55:06 +01:00 committed by Jan De Dobbeleer
parent 01bd42b3eb
commit 55ab413d6e

View file

@ -8,6 +8,7 @@ import (
"oh-my-posh/segments"
"oh-my-posh/template"
"runtime/debug"
"strings"
"time"
)
@ -160,7 +161,7 @@ func (segment *Segment) string() string {
if err != nil {
return err.Error()
}
segment.active = len(text) > 0
segment.active = len(strings.TrimSpace(text)) > 0
return text
}