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 {
symbol = e.previousActiveSegment.PowerlineSymbol
}
if e.activeSegment.InvertPowerlineSymbolColor {
if e.activeSegment.InvertPowerline {
e.renderer.write(foreground, background, symbol)
return
}

View file

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