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

This commit is contained in:
Dylan 2016-02-21 08:53:30 +11:00
parent b567f3057d
commit 1954063895

5
fetch
View file

@ -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"
;;
*"%")