cursor: simplify statement

This commit is contained in:
Dylan Araps 2018-06-04 10:46:47 +10:00
parent cc0d232b48
commit d6505023a9
1 changed files with 2 additions and 6 deletions

View File

@ -4126,11 +4126,7 @@ dynamic_prompt() {
[[ "$image_backend" != "ascii" ]] && lines="$(((height + yoffset) / font_height + 1))"
# If the ascii art is taller than the info.
if ((lines > info_height)); then
lines="$((lines - info_height + 1))"
else
lines=1
fi
((lines=lines>info_height?lines-info_height+1:1))
printf -v nlines "%${lines}s"
printf "%b" "${nlines// /\\n}"