diff --git a/lib/formatador/progressbar.rb b/lib/formatador/progressbar.rb index a0153f6..0d999fc 100644 --- a/lib/formatador/progressbar.rb +++ b/lib/formatador/progressbar.rb @@ -4,9 +4,9 @@ def redisplay_progressbar(current, total, options = {}) options = { :color => 'white', :width => 50, :new_line => true }.merge!(options) data = progressbar(current, total, options) if current < total - redisplay(data) + redisplay(data, options[:width]) else - redisplay("#{data}") + redisplay("#{data}", options[:width]) if options[:new_line] new_line end