Fix padding on android

This commit is contained in:
Dylan Araps 2016-08-28 11:41:27 +10:00
parent 5444ecdf6d
commit 76cc33f95f
1 changed files with 5 additions and 0 deletions

View File

@ -1974,6 +1974,11 @@ getascii() {
[ "${#line}" -gt "$ascii_length" ] && ascii_length="${#line}"
done <<< "$ascii_strip"
# Workaround for calculating length of block chars
# when locale is set to 'C'
block_char="█"
[ "${#block_char}" == 3 ] && ascii_length="$((ascii_length / 3 + 2))"
lines="$(printf "%s\n" "$ascii_strip" | wc -l)"
padding="\033[$((ascii_length + gap))C"
printf "%b%s" "$print"