Fix broken progress bars

This commit is contained in:
Dylan Araps 2016-10-04 09:43:51 +11:00
parent 4412d063f3
commit be2d486c41

View file

@ -2361,14 +2361,6 @@ info() {
# Trim whitespace # Trim whitespace
output="$(trim "$output")" output="$(trim "$output")"
# Fix rendering issues with w3m and lines that
# wrap to the next line by adding a max line
# length.
if [ "$image" != "off" ] && [ "$image" != "ascii" ] && [ "$1" != "cols" ]; then
padding_num="${padding/\\033\[}"
output="$(printf "%.$((columns - ${padding_num/C} - gap - ${#subtitle}))s" "$output")"
fi
case "$1" in case "$1" in
title) title)
string="${title_color}${bold}${output}" string="${title_color}${bold}${output}"
@ -2404,14 +2396,6 @@ info() {
prin() { prin() {
string="$1${2:+: $2}" string="$1${2:+: $2}"
# Fix rendering issues with w3m and lines that
# wrap to the next line by adding a max line
# length.
if [ "$image" != "off" ] && [ "$image" != "ascii" ]; then
padding_num="${padding/\\033\[}"
string="$(printf "%.$((columns - ${padding_num/C} - gap))s" "$string")"
fi
# If $2 doesn't exist we format $1 as info # If $2 doesn't exist we format $1 as info
if [ -z "$2" ]; then if [ -z "$2" ]; then
subtitle_color="$info_color" subtitle_color="$info_color"