mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-12-15 16:37:13 +00:00
Fix yoffset bug
This commit is contained in:
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
|
||||
|
||||
Reference in New Issue
Block a user