indicators icon indicating copy to clipboard operation
indicators copied to clipboard

fit progress bar to terminal width changes?

Open wkjarosz opened this issue 2 years ago • 1 comments

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

wkjarosz avatar Aug 06 '21 13:08 wkjarosz

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.

nejcgalof avatar Aug 17 '21 10:08 nejcgalof