update progress rendering to be closer to v0.1.10

This commit is contained in:
Jeffrey Morgan 2023-11-19 13:43:21 -05:00
parent 95b9acd324
commit c06b9b7304
4 changed files with 46 additions and 70 deletions

View file

@ -66,7 +66,8 @@ func (b *Bar) String() string {
mid.WriteString("▕")
f := termWidth - pre.Len() - suf.Len() - 2
// add 3 extra spaces: 2 boundary characters and 1 space at the end
f := termWidth - pre.Len() - suf.Len() - 3
n := int(float64(f) * b.percent() / 100)
if n > 0 {