Fix bug with block chars
This commit is contained in:
parent
e5359dc314
commit
7bdf5f1168
1 changed files with 5 additions and 5 deletions
10
neofetch
10
neofetch
|
@ -2091,6 +2091,11 @@ getascii() {
|
|||
ascii_strip="${ascii_strip//'\\'/ }"
|
||||
ascii_strip="${ascii_strip//'\'}"
|
||||
|
||||
# Workaround for calculating length of block chars
|
||||
# when locale is set to 'C'
|
||||
block_char="█"
|
||||
[ "${#block_char}" == 3 ] && ascii_strip="${ascii_strip//${block_char}/ }"
|
||||
|
||||
# Get lines/columns of the ascii file.
|
||||
ascii_length=0
|
||||
lines=1
|
||||
|
@ -2099,11 +2104,6 @@ getascii() {
|
|||
lines="$((lines+=1))"
|
||||
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))"
|
||||
|
||||
padding="\033[$((ascii_length + gap))C"
|
||||
printf "%b%s" "$print"
|
||||
export LC_ALL=C
|
||||
|
|
Loading…
Reference in a new issue