Codebase list golang-github-vbauerster-mpb / 368adad
correct barWidth Vladimir Bauer 9 years ago
1 changed file(s) with 3 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
426426 }
427427
428428 totalCount := prependCount + barCount + appendCount
429 if totalCount >= termWidth {
430 newWidth := termWidth - prependCount - appendCount - 1
429 if totalCount > termWidth {
430 newWidth := termWidth - prependCount - appendCount
431431 barBlock = s.fillBar(newWidth)
432432 }
433433
445445 }
446446
447447 // bar width without leftEnd and rightEnd characters
448 barWidth := width - 2
448 barWidth := width - 1
449449 formatBytes := s.convertFormatRunesToBytes()
450450
451451 if s.simpleSpinner != nil {
481481 }
482482 // set tip bit
483483 if completedWidth > 0 && completedWidth < barWidth {
484 // buf[completedWidth-1] = s.tip
485484 buf = append(buf, formatBytes[2]...)
486485 }
487486