Fix yoffset bug
This commit is contained in:
parent
466a61b19e
commit
b12e5b1f56
1 changed files with 5 additions and 3 deletions
8
neofetch
8
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
|
||||
|
|
Loading…
Reference in a new issue