mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-12-24 04:22:32 +00:00
Fix bug with block chars
This commit is contained in:
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
|
||||
|
||||
Reference in New Issue
Block a user