Fix color blocks bug

This commit is contained in:
Dylan Araps 2016-06-09 16:09:20 +10:00
parent a86907bd5a
commit d5c32a1805
1 changed files with 3 additions and 2 deletions

View File

@ -24,6 +24,7 @@
# https://github.com/dylanaraps/
version="${BASH_VERSION/.*}"
SYS_LOCALE="${LANG:-C}"
XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-${HOME}/.config}"
@ -2110,8 +2111,8 @@ getcols () {
spaces="$(printf "%${block_height}s")"
# Convert the spaces into rows of blocks.
[ ! -z "$blocks" ] && cols+=${spaces// /${blocks}\033[0mnl}
[ ! -z "$blocks2" ] && cols+=${spaces// /${blocks2}\033[0mnl}
[ ! -z "$blocks" ] && cols+=${spaces// /${blocks}"\033[0m"nl}
[ ! -z "$blocks2" ] && cols+=${spaces// /${blocks2}"\033[0m"nl}
# Add newlines to the string.
cols=${cols%%'nl'}