Made variables local in get_cols function
The variables blocks, blocks2, and cols were not set as local in the get_cols function, which made neofetch print whatever value they had before showing the colorblocks. This commit makes these variables local so the output doesn't get affected if they are set beforehand.
This commit is contained in:
parent
b6b320a75a
commit
2ecd8102d0
1 changed files with 1 additions and 0 deletions
1
neofetch
1
neofetch
|
@ -3359,6 +3359,7 @@ get_gpu_driver() {
|
||||||
}
|
}
|
||||||
|
|
||||||
get_cols() {
|
get_cols() {
|
||||||
|
local blocks blocks2 cols
|
||||||
if [[ "$color_blocks" == "on" ]]; then
|
if [[ "$color_blocks" == "on" ]]; then
|
||||||
# Convert the width to space chars.
|
# Convert the width to space chars.
|
||||||
printf -v block_width "%${block_width}s"
|
printf -v block_width "%${block_width}s"
|
||||||
|
|
Loading…
Reference in a new issue