-
Notifications
You must be signed in to change notification settings - Fork 239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ProgressBar 'shrinks' in Windows cmd #95
Comments
@Amomum Can you confirm if this still happens in the latest release? Thanks. |
@p-ranav yes, it still happens with 2.2 |
Okay, after a bit of digging I found out the following that progress bar shrinks on every fourth step. indicators/include/indicators/details/stream_helper.hpp Lines 139 to 155 in cdcff01
When progress value is divisible by four, pos will be even and that will cause progress-bar to shrink. I noticed that I checked on my linux machine and there Why and what exactly is happening is a bit beyond me; I can only say for sure that when this call to
on my Windows machine |
Okay, so on my Windows machine, compiled with MinGW 8.1.0 64-bit this snippet produces a hieroglyphic:
This starts to look like bug in standard library implementation ._. |
https://sourceforge.net/p/mingw-w64/bugs/538/ this one looks very similar, I'll try suggested workaround. |
Workaround - Looks like some more investigation is required...
For some reason this line:
starts to produce a newline. The most puzzling part is that it's that string with spaces alone produces a newline! Do you have any ideas why that may be happening? |
Hm, looks like So, looks like fixing utf8 encoding affected calculation of remaining length and caused this! Sorry for me blabbing here but I think that's it :) Now the real question remains - how to fix this :) |
I took 'Working with Iterables' example and modified it slightly (simple ProgressBar instead of BlockProgressBar, removed cursor manipulation and made vector smaller):
This is how it looks in my windows 7 cmd:
https://imgur.com/ZpXaMvC
Progress-bar itself 'shrinks' and there is no percent-indicator that is present in the example gif:
The text was updated successfully, but these errors were encountered: