mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-01-28 11:31:04 -08:00
fix: set correct color for diamonds on inheritance
This commit is contained in:
parent
3d4b3c891c
commit
36c318a02a
|
@ -161,9 +161,13 @@ func (b *Block) renderPlainSegment(text string) {
|
|||
}
|
||||
|
||||
func (b *Block) renderDiamondSegment(text string) {
|
||||
b.writer.write(Transparent, b.activeSegment.background(), b.activeSegment.LeadingDiamond)
|
||||
background := b.activeSegment.background()
|
||||
if background == Inherit {
|
||||
background = b.previousActiveSegment.background()
|
||||
}
|
||||
b.writer.write(Transparent, background, b.activeSegment.LeadingDiamond)
|
||||
b.renderText(text)
|
||||
b.writer.write(Transparent, b.activeSegment.background(), b.activeSegment.TrailingDiamond)
|
||||
b.writer.write(Transparent, background, b.activeSegment.TrailingDiamond)
|
||||
}
|
||||
|
||||
func (b *Block) renderText(text string) {
|
||||
|
|
Loading…
Reference in a new issue