Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Passing the correct width to redisplay, to prevent unnecessary overru…

…n on small terminals
  • Loading branch information...
commit c4fa96e0c0545fd68f70c5ee5b22b895181f05b6 1 parent 7a7353f
@temujin9 temujin9 authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/formatador/progressbar.rb
View
4 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
Please sign in to comment.
Something went wrong with that request. Please try again.