diff --git a/_examples/poplog/main.go b/_examples/poplog/main.go index ad95246..fb6b375 100644 --- a/_examples/poplog/main.go +++ b/_examples/poplog/main.go @@ -65,6 +65,6 @@ func makeLogBar(msg string) mpb.BarFiller { limit := "%%.%ds" return mpb.BarFillerFunc(func(w io.Writer, _ int, st decor.Statistics) { - fmt.Fprintf(w, fmt.Sprintf(limit, st.TermWidth-st.OccupiedWidth), msg) + fmt.Fprintf(w, fmt.Sprintf(limit, st.AvailableWidth), msg) }) } diff --git a/_examples/suppressBar/main.go b/_examples/suppressBar/main.go index 2572312..955be37 100644 --- a/_examples/suppressBar/main.go +++ b/_examples/suppressBar/main.go @@ -101,7 +101,7 @@ default: } if msg != nil { - limitFmt := fmt.Sprintf("%%.%ds", st.TermWidth-st.OccupiedWidth) + limitFmt := fmt.Sprintf("%%.%ds", st.AvailableWidth) fmt.Fprintf(w, limitFmt, *msg) nextCh <- struct{}{} } else {