Commit d6505023 authored by Dylan Araps's avatar Dylan Araps

cursor: simplify statement

parent cc0d232b
...@@ -4122,15 +4122,11 @@ kde_config_dir() { ...@@ -4122,15 +4122,11 @@ kde_config_dir() {
} }
dynamic_prompt() { dynamic_prompt() {
[[ "$image_backend" == "off" ]] && { printf '\n'; return; } [[ "$image_backend" == "off" ]] && { printf '\n'; return; }
[[ "$image_backend" != "ascii" ]] && lines="$(((height + yoffset) / font_height + 1))" [[ "$image_backend" != "ascii" ]] && lines="$(((height + yoffset) / font_height + 1))"
# If the ascii art is taller than the info. # If the ascii art is taller than the info.
if ((lines > info_height)); then ((lines=lines>info_height?lines-info_height+1:1))
lines="$((lines - info_height + 1))"
else
lines=1
fi
printf -v nlines "%${lines}s" printf -v nlines "%${lines}s"
printf "%b" "${nlines// /\\n}" printf "%b" "${nlines// /\\n}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment