Skip to content

Commit

Permalink
populate frame shutdown related fields at complete or abort events only
Browse files Browse the repository at this point in the history
  • Loading branch information
vbauerster committed Dec 5, 2023
1 parent 2dcb25d commit da3162c
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions bar.go
Original file line number Diff line number Diff line change
Expand Up @@ -429,13 +429,11 @@ func (b *Bar) render(tw int) {
return
}
}
frame := &renderFrame{
rows: rows,
shutdown: s.shutdown,
rmOnComplete: s.rmOnComplete,
noPop: s.noPop,
}
frame := &renderFrame{rows: rows}
if s.completed || s.aborted {
frame.shutdown = s.shutdown
frame.rmOnComplete = s.rmOnComplete
frame.noPop = s.noPop
// post increment makes sure OnComplete decorators are rendered
s.shutdown++
}
Expand Down

0 comments on commit da3162c

Please sign in to comment.