diff --git a/bar_filler_bar.go b/bar_filler_bar.go index 77c1b03..c64b76a 100644 --- a/bar_filler_bar.go +++ b/bar_filler_bar.go @@ -173,7 +173,7 @@ var refWidth int curWidth := int(internal.PercentageRound(stat.Total, stat.Current, uint(width))) - if stat.Current >= stat.Total { + if stat.Completed { tip = s.tip.onComplete } else { tip = s.tip.frames[s.tip.count%uint(len(s.tip.frames))] diff --git a/draw_test.go b/draw_test.go index 75afc83..9a50334 100644 --- a/draw_test.go +++ b/draw_test.go @@ -773,6 +773,7 @@ s.current = tc.current s.trimSpace = tc.trim s.refill = tc.refill + s.completed = tc.total > 0 && tc.current >= tc.total tmpBuf.Reset() r, err := s.draw(newStatistics(tw, s)) if err != nil { @@ -1227,6 +1228,7 @@ s.current = tc.current s.trimSpace = tc.trim s.refill = tc.refill + s.completed = tc.total > 0 && tc.current >= tc.total tmpBuf.Reset() r, err := s.draw(newStatistics(tw, s)) if err != nil { @@ -1403,6 +1405,7 @@ s.current = tc.current s.trimSpace = tc.trim s.refill = tc.refill + s.completed = tc.total > 0 && tc.current >= tc.total tmpBuf.Reset() r, err := s.draw(newStatistics(tw, s)) if err != nil {