Skip to content

Commit cc449e8

Browse files
committed
Update progress bar width handling to override full width option when explicitly specified
1 parent 46ba4fd commit cc449e8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

internal/progress/bar.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,10 @@ func NewRealProgressBar(total int64, desc string, opts ...Option) *ProgressBar {
5959
progressbar.OptionShowCount(),
6060
progressbar.OptionSetPredictTime(options.ShowETA),
6161
progressbar.OptionSetElapsedTime(options.ShowElapsed),
62+
progressbar.OptionFullWidth(), // Use full terminal width when width=0
6263
}
6364

64-
// Only set width if explicitly specified (0 means auto-detect, don't pass to library)
65+
// Only set width if explicitly specified (overrides OptionFullWidth)
6566
if options.Width > 0 {
6667
barOpts = append(barOpts, progressbar.OptionSetWidth(options.Width))
6768
}

0 commit comments

Comments
 (0)