Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Passing the correct width to redisplay, to prevent unnecessary overru…
…n on small terminals
  • Loading branch information
temujin9 committed Apr 12, 2012
1 parent 7a7353f commit c4fa96e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/formatador/progressbar.rb
Expand Up @@ -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
Expand Down

0 comments on commit c4fa96e

Please sign in to comment.