From 50f87a4233d6ddbf7b771c8c05cb4afa3529b1dd Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 22 Oct 2016 09:51:58 +1100 Subject: [PATCH] Fix cursor bugs if ascii art is taller than info --- neofetch | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index 134237f1..e699fcbd 100755 --- a/neofetch +++ b/neofetch @@ -2912,6 +2912,8 @@ dynamicprompt() { if [ "$image" != "ascii" ]; then lines="$((${height:-1} / ${font_height:-1} + 2))" cursor_yoffset="$((${yoffset:-1} / ${font_height:-1}))" + else + cursor_yoffset="0 - 4" fi # If the info is higher than the ascii/image place the prompt @@ -2923,10 +2925,10 @@ dynamicprompt() { fi # Set the prompt location - [ "$image" != "off" ] && printf "\033[${lines/-*/0}B" + printf "\033[${lines/-*/0}B" # Add some padding - [ "$image_backend" != "w3m" ] && \ + [ "$image" == "ascii" ] && \ [ "$lines" -gt 0 ] && \ printf "\n\n" }