Skip to content
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

fit progress bar to terminal width changes? #102

Open
wkjarosz opened this issue Aug 6, 2021 · 1 comment
Open

fit progress bar to terminal width changes? #102

wkjarosz opened this issue Aug 6, 2021 · 1 comment

Comments

@wkjarosz
Copy link

wkjarosz commented Aug 6, 2021

Is there a way to have the progress bars react to terminal width changes so that each update does not spill onto the next line?

Thanks

@nejcgalof
Copy link

I manually fixed this problem with a bar width ratio like 1/4 of terminal width.
Also I have long postfixes, and calculate the remaining length and concat string like:
std::string postfix_text_cut = postfix_text.substr(0, postfix_length + remaining);

Is not a general solution, so this is the reason for no PR, but maybe helped for some extra idea how to solve it.

Definitely is that issue very important for the smaller console windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants