Only get column count if we need it.
This commit is contained in:
parent
4f068c4f4c
commit
f7107a8ffb
1 changed files with 3 additions and 3 deletions
6
fetch
6
fetch
|
@ -1573,6 +1573,9 @@ getimage () {
|
|||
return
|
||||
fi
|
||||
|
||||
# Get columns
|
||||
columns=$(tput cols)
|
||||
|
||||
# Image size is half of the terminal
|
||||
imgsize=$((columns * font_width / split_size))
|
||||
|
||||
|
@ -2103,9 +2106,6 @@ trap 'printf "\033[?25h"; clear; exit' 2
|
|||
# If the script exits for any reason, unhide the cursor.
|
||||
trap 'printf "\033[?25h"' EXIT
|
||||
|
||||
# Get columns
|
||||
columns=$(tput cols)
|
||||
|
||||
if [ "$image" != "off" ]; then
|
||||
# Hide the cursor
|
||||
printf "\033[?25l"
|
||||
|
|
Loading…
Reference in a new issue