[PR] #314 from thepigeongenerator: fix colours not reverting properly

fix colours not reverting properly
This commit is contained in:
Azalea 2024-06-27 00:35:24 +08:00 committed by GitHub
commit c185f018a4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -5329,10 +5329,10 @@ get_cols() {
# Convert the spaces into rows of blocks.
if [ "${BASH_VERSION%%.*}" -lt 5 ]; then
[[ "$blocks" ]] && cols+="${block_spaces// /${blocks}nl}"
[[ "$blocks2" ]] && cols+="${block_spaces// /${blocks2}nl}"
[[ "$blocks2" ]] && cols+="${block_spaces// /${blocks2}nl}"
else
[[ "$blocks" ]] && cols+="${block_spaces// /${blocks}\[39;49mnl}"
[[ "$blocks2" ]] && cols+="${block_spaces// /${blocks2}\[39;49mnl}"
[[ "$blocks2" ]] && cols+="${block_spaces// /${blocks2}\[0mnl}"
fi
# Determine the horizontal offset of the blocks.