diff --git a/bar.go b/bar.go index c7de057..3b946de 100644 --- a/bar.go +++ b/bar.go @@ -337,7 +337,7 @@ } func (s *state) draw(termWidth int, prependWs, appendWs *widthSync) { - if termWidth < 0 { + if termWidth <= 0 { termWidth = s.width } diff --git a/options.go b/options.go index 53bd9eb..acaa941 100644 --- a/options.go +++ b/options.go @@ -27,7 +27,7 @@ // WithWidth overrides default width 80 func WithWidth(w int) ProgressOption { return func(c *pConf) { - if w > 2 { + if w >= 0 { c.width = w } }