diff --git a/bar.go b/bar.go index 7e19ba6..8e7f539 100644 --- a/bar.go +++ b/bar.go @@ -427,8 +427,8 @@ } totalCount := prependCount + barCount + appendCount - if totalCount >= termWidth { - newWidth := termWidth - prependCount - appendCount - 1 + if totalCount > termWidth { + newWidth := termWidth - prependCount - appendCount barBlock = s.fillBar(newWidth) } @@ -446,7 +446,7 @@ } // bar width without leftEnd and rightEnd characters - barWidth := width - 2 + barWidth := width - 1 formatBytes := s.convertFormatRunesToBytes() if s.simpleSpinner != nil { @@ -482,7 +482,6 @@ } // set tip bit if completedWidth > 0 && completedWidth < barWidth { - // buf[completedWidth-1] = s.tip buf = append(buf, formatBytes[2]...) }