mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-28 20:39:40 -08:00
feat(color): do not clear parent colors
This commit is contained in:
parent
60664e245a
commit
8cd8c9a7be
|
@ -15,7 +15,6 @@ type PlainWriter struct {
|
|||
|
||||
func (a *PlainWriter) SetColors(background, foreground string) {}
|
||||
func (a *PlainWriter) SetParentColors(background, foreground string) {}
|
||||
func (a *PlainWriter) ClearParentColors() {}
|
||||
|
||||
func (a *PlainWriter) Write(background, foreground, text string) {
|
||||
if len(text) == 0 {
|
||||
|
|
|
@ -15,7 +15,6 @@ type Writer interface {
|
|||
String() (string, int)
|
||||
SetColors(background, foreground string)
|
||||
SetParentColors(background, foreground string)
|
||||
ClearParentColors()
|
||||
}
|
||||
|
||||
// AnsiWriter writes colorized ANSI strings
|
||||
|
@ -101,10 +100,6 @@ func (a *AnsiWriter) SetParentColors(background, foreground string) {
|
|||
}}, a.ParentColors...)
|
||||
}
|
||||
|
||||
func (a *AnsiWriter) ClearParentColors() {
|
||||
a.ParentColors = nil
|
||||
}
|
||||
|
||||
func (a *AnsiWriter) getAnsiFromColorString(colorString string, isBackground bool) AnsiColor {
|
||||
return a.AnsiColors.AnsiColorFromString(colorString, isBackground)
|
||||
}
|
||||
|
|
|
@ -137,7 +137,6 @@ func (b *Block) RenderSegments() (string, int) {
|
|||
b.renderActiveSegment()
|
||||
}
|
||||
b.writePowerline(true)
|
||||
b.writer.ClearParentColors()
|
||||
return b.writer.String()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue