From 3e18c241abb69e83b386065bfbe20f888fefe60e Mon Sep 17 00:00:00 2001 From: Jan De Dobbeleer Date: Sun, 27 Sep 2020 09:37:50 +0200 Subject: [PATCH] refactor: rename for clarity --- engine.go | 2 +- segment.go | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/engine.go b/engine.go index 8911675b..cc11f15e 100644 --- a/engine.go +++ b/engine.go @@ -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 } diff --git a/segment.go b/segment.go index 12ae0cbc..c9420450 100644 --- a/segment.go +++ b/segment.go @@ -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