mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-11-13 14:34:06 -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
|
||||
}
|
||||
b.activeSegment = segment
|
||||
b.activeBackground = b.activeSegment.background()
|
||||
b.activeForeground = b.activeSegment.foreground()
|
||||
b.writer.setColors(b.activeBackground, b.activeForeground)
|
||||
b.endPowerline()
|
||||
b.renderSegmentText(segment.stringValue)
|
||||
}
|
||||
|
@ -140,9 +143,6 @@ func (b *Block) getPowerlineColor(foreground bool) 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 {
|
||||
case Plain:
|
||||
b.renderPlainSegment(text)
|
||||
|
|
Loading…
Reference in a new issue