mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-02-02 05:41:10 -08:00
fix: wrong background for powerline in some cases
activeBackground color is wrong when a diamong segment follows a powerline segment.
This commit is contained in:
parent
7197d58080
commit
1b29ae136d
|
@ -89,6 +89,9 @@ func (b *Block) renderSegments() string {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
b.activeSegment = segment
|
b.activeSegment = segment
|
||||||
|
b.activeBackground = b.activeSegment.background()
|
||||||
|
b.activeForeground = b.activeSegment.foreground()
|
||||||
|
b.writer.setColors(b.activeBackground, b.activeForeground)
|
||||||
b.endPowerline()
|
b.endPowerline()
|
||||||
b.renderSegmentText(segment.stringValue)
|
b.renderSegmentText(segment.stringValue)
|
||||||
}
|
}
|
||||||
|
@ -140,9 +143,6 @@ func (b *Block) getPowerlineColor(foreground bool) string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (b *Block) renderSegmentText(text string) {
|
func (b *Block) renderSegmentText(text string) {
|
||||||
b.activeBackground = b.activeSegment.background()
|
|
||||||
b.activeForeground = b.activeSegment.foreground()
|
|
||||||
b.writer.setColors(b.activeBackground, b.activeForeground)
|
|
||||||
switch b.activeSegment.Style {
|
switch b.activeSegment.Style {
|
||||||
case Plain:
|
case Plain:
|
||||||
b.renderPlainSegment(text)
|
b.renderPlainSegment(text)
|
||||||
|
|
Loading…
Reference in a new issue