Use a variable so we don't calculate terminal height twice
This commit is contained in:
parent
b567f3057d
commit
1954063895
1 changed files with 3 additions and 2 deletions
5
fetch
5
fetch
|
@ -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"
|
||||
;;
|
||||
|
||||
*"%")
|
||||
|
|
Loading…
Reference in a new issue