Codebase list golang-github-vbauerster-mpb / 320d569
tw <= 0 fix Vladimir Bauer 8 years ago
2 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
336336 }
337337
338338 func (s *state) draw(termWidth int, prependWs, appendWs *widthSync) {
339 if termWidth < 0 {
339 if termWidth <= 0 {
340340 termWidth = s.width
341341 }
342342
2626 // WithWidth overrides default width 80
2727 func WithWidth(w int) ProgressOption {
2828 return func(c *pConf) {
29 if w > 2 {
29 if w >= 0 {
3030 c.width = w
3131 }
3232 }