From 77282c8fea326c79da742b5bbee95e2a32f3d076 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 25 May 2018 06:07:42 +1000 Subject: [PATCH] general: revert Fix prompt issue 2 --- neofetch | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/neofetch b/neofetch index 393845fd..d55ed960 100755 --- a/neofetch +++ b/neofetch @@ -4201,20 +4201,20 @@ kde_config_dir() { dynamic_prompt() { [[ "$image_backend" == "off" ]] && { printf "\n"; return; } - [[ "$image_backend" != "ascii" ]] && { printf "%b" "\e[1000;0H"; return; } + [[ "$image_backend" != "ascii" ]] && ((lines+=1000)) # If the ascii art is taller than the info. if ((lines > info_height)); then - prompt="$((lines - info_height + 1))" + lines="$((lines - info_height + 1))" else - prompt=1 + lines=1 fi # Set the prompt location. if ((lines >= 1)); then case "$kernel_name" in - "OpenBSD") tput cud "$prompt" ;; - *) printf "\n\n%b" "\e[${prompt}D" ;; + "OpenBSD") tput cud "$lines" ;; + *) printf "%b" "\e[${lines}B" ;; esac fi }