mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-03-05 20:49:04 -08:00
parent
e3723365cb
commit
46b8cea72a
|
@ -1,7 +1,6 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
@ -167,10 +166,12 @@ func (b *Block) renderDiamondSegment(text string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (b *Block) renderText(text string) {
|
func (b *Block) renderText(text string) {
|
||||||
|
bg := b.activeSegment.background()
|
||||||
|
fg := b.activeSegment.foreground()
|
||||||
defaultValue := " "
|
defaultValue := " "
|
||||||
prefix := b.activeSegment.getValue(Prefix, defaultValue)
|
b.writer.write(bg, fg, b.activeSegment.getValue(Prefix, defaultValue))
|
||||||
postfix := b.activeSegment.getValue(Postfix, defaultValue)
|
b.writer.write(bg, fg, text)
|
||||||
b.writer.write(b.activeSegment.background(), b.activeSegment.foreground(), fmt.Sprintf("%s%s%s", prefix, text, postfix))
|
b.writer.write(bg, fg, b.activeSegment.getValue(Postfix, defaultValue))
|
||||||
}
|
}
|
||||||
|
|
||||||
func (b *Block) debug() (int, []*SegmentTiming) {
|
func (b *Block) debug() (int, []*SegmentTiming) {
|
||||||
|
|
Loading…
Reference in a new issue