From abf9b5d25727c8447d351c91d26acf345355ed9f Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 5 Oct 2016 08:15:20 +1100 Subject: [PATCH] Fix incorrect cursor position when using small ascii art --- neofetch | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index 26d5fa88..973cd414 100755 --- a/neofetch +++ b/neofetch @@ -1995,8 +1995,10 @@ getascii() { ascii="${ascii_distro,,}" fi - [ "$ascii_logo_size" == "small" ] && \ + if [ "$ascii_logo_size" == "small" ]; then ascii="${ascii/ *}_small" + prompt_loc="3" + fi if [ -f "/usr/share/neofetch/ascii/distro/${ascii/ *}" ]; then ascii="/usr/share/neofetch/ascii/distro/${ascii/ *}" @@ -3244,7 +3246,7 @@ main() { fi # Set cursor position next to ascii art - printf "\033[$((${lines:-0} - 4))A" + printf "\033[$((${lines:-0} - ${prompt_loc:-4}))A" # Reset horizontal cursor position printf "\033[9999999D"