Commit 19540638 authored by Dylan's avatar Dylan

Use a variable so we don't calculate terminal height twice

parent b567f305
......@@ -1837,9 +1837,10 @@ getimage () {
case "$image_size" in
"auto")
image_size=$((columns * font_width / 2))
term_height=$((term_height - term_height / 4))
[ "$((term_height - term_height / 4))" -lt "$image_size" ] && \
image_size=$((term_height - term_height / 4))
[ "$term_height" -lt "$image_size" ] && \
image_size="$term_height"
;;
*"%")
......
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