Always creates 2 bars (Windows msys2, CentOS 7.4)
JorySchossau opened this issue · comments
I recreated the demo, but I always get 2 bars, perhaps related to the extra printing of a '%' symbol?
[================================================.....................] 69.00%%
[=====================================================================>] 100.00%
nim v 0.19.4 installed progress via nimble
Some more information.
On windows:
run though cmd, all operates correctly (single bar, fits window width)
run through msys2 it fails to find the terminal width correctly and produces 2 bars.
Usually, running a failing CLI utility using winpty (wintpy ./test.exe
) fixes these kinds of issues, but not here.
I get the same symptom of 2 bars on native CentOS 7.4 if I try setting the total to 1000 then calling increment() 1000 times, even with a slow sleep (using the same demo code):
[=====...............................................................] 6.80%%
[====================================================================>] 100.00%
I've narrowed it down in CentOS to being contingent on only if the terminal width is less than total+11
where total
is the quantity given in the constructor newProgressBar(total=...)