From b12e5b1f569898e91c0a2d3887d3fdd2111fb488 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 22 Oct 2016 01:05:47 +1100 Subject: [PATCH] Fix yoffset bug --- neofetch | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/neofetch b/neofetch index db55e25a..e968807e 100755 --- a/neofetch +++ b/neofetch @@ -2907,15 +2907,17 @@ kdeconfigdir() { dynamicprompt() { # Calculate image height in terminal cells. # The '+ 1' adds a gap between the prompt and the content. - [ "$image" != "ascii" ] && \ - lines="$((${height:-1} / ${font_height:-1} + 1))" + if [ "$image" != "ascii" ]; then + lines="$((${height:-1} / ${font_height:-1} + 2))" + cursor_yoffset="$((${yoffset:-1} / ${font_height:-1}))" + fi # If the info is higher than the ascii/image place the prompt # based on the info height instead of the ascii/image height. if [ "${lines:-0}" -lt "${info_height:-0}" ]; then lines="0" else - lines="$((lines - info_height + $((${yoffset:-1} / ${font_height:-1}))))" + lines="$((lines - info_height + cursor_yoffset - 1))" fi # Set the prompt location