mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-02-21 02:55:37 -08:00
fix: do not render empty/whitespace segments
This commit is contained in:
parent
01bd42b3eb
commit
55ab413d6e
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue