refactor: rename for clarity

This commit is contained in:
Jan De Dobbeleer 2020-09-27 09:37:50 +02:00 committed by Jan De Dobbeleer
parent 82c8483603
commit 3e18c241ab
2 changed files with 11 additions and 11 deletions

View file

@ -31,7 +31,7 @@ func (e *engine) writePowerLineSeparator(background string, foreground string, e
if end { if end {
symbol = e.previousActiveSegment.PowerlineSymbol symbol = e.previousActiveSegment.PowerlineSymbol
} }
if e.activeSegment.InvertPowerlineSymbolColor { if e.activeSegment.InvertPowerline {
e.renderer.write(foreground, background, symbol) e.renderer.write(foreground, background, symbol)
return return
} }

View file

@ -4,16 +4,16 @@ import "errors"
//Segment represent a single segment and it's configuration //Segment represent a single segment and it's configuration
type Segment struct { type Segment struct {
Type SegmentType `json:"type"` Type SegmentType `json:"type"`
Style SegmentStyle `json:"style"` Style SegmentStyle `json:"style"`
PowerlineSymbol string `json:"powerline_symbol"` PowerlineSymbol string `json:"powerline_symbol"`
InvertPowerlineSymbolColor bool `json:"invert_powerline_symbol_color"` InvertPowerline bool `json:"invert_powerline"`
Foreground string `json:"foreground"` Foreground string `json:"foreground"`
Background string `json:"background"` Background string `json:"background"`
LeadingDiamond string `json:"leading_diamond"` LeadingDiamond string `json:"leading_diamond"`
TrailingDiamond string `json:"trailing_diamond"` TrailingDiamond string `json:"trailing_diamond"`
Properties map[Property]interface{} `json:"properties"` Properties map[Property]interface{} `json:"properties"`
writer SegmentWriter writer SegmentWriter
} }
//SegmentWriter is the interface used to define what and if to write to the prompt //SegmentWriter is the interface used to define what and if to write to the prompt