mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-01-26 10:31:20 -08:00
refactor: remove redundant length property
This commit is contained in:
parent
8b5b8dac65
commit
d5da06e33d
|
@ -41,7 +41,6 @@ type Block struct {
|
|||
ansi *color.Ansi
|
||||
activeSegment *Segment
|
||||
previousActiveSegment *Segment
|
||||
length int
|
||||
}
|
||||
|
||||
func (b *Block) init(env environment.Environment, writer color.Writer, ansi *color.Ansi) {
|
||||
|
@ -178,7 +177,7 @@ func (b *Block) debug() (int, []*SegmentTiming) {
|
|||
segmentTiming.text = segment.text
|
||||
if segmentTiming.active {
|
||||
b.renderSegment(segment)
|
||||
segmentTiming.text, b.length = b.writer.String()
|
||||
segmentTiming.text, _ = b.writer.String()
|
||||
b.writer.Reset()
|
||||
}
|
||||
segmentTiming.duration = time.Since(start)
|
||||
|
|
Loading…
Reference in a new issue