"text"*-x fixed.

This commit is contained in:
Denis Knauf 2014-12-23 20:19:07 +01:00
parent 06a3300740
commit 55f3a15e81

View file

@ -72,7 +72,7 @@ class ProgressBar::Console < ProgressBar::Base
def change_text def change_text
l = (100.0*i/max).to_i l = (100.0*i/max).to_i
dd, td = done_dur, total_dur dd, td = done_dur, total_dur
STDOUT.printf "\r\e[J%s / %s [%s>%s] %s", format_time(dd), format_time(td), '='*l, ' '*(100-l), text STDOUT.printf "\r\e[J%s / %s [%s>%s] %s", format_time(dd), format_time(td), '='*l, ' '*[100, 100-l].min, text
end end
alias change_progress change_text alias change_progress change_text