misc changes to the order some things are run
This commit is contained in:
parent
3a86cd90bd
commit
77562390ac
23
fetch
23
fetch
|
@ -1553,8 +1553,9 @@ getimage () {
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Get columns
|
# Get lines and columns
|
||||||
columns=$(tput cols)
|
columns=$(tput cols)
|
||||||
|
lines=$(tput lines)
|
||||||
|
|
||||||
# Image size is half of the terminal
|
# Image size is half of the terminal
|
||||||
imgsize=$((columns * font_width / split_size))
|
imgsize=$((columns * font_width / split_size))
|
||||||
|
@ -1572,9 +1573,6 @@ getimage () {
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Lines equals terminal height
|
|
||||||
lines=$(tput lines)
|
|
||||||
|
|
||||||
# Make the directory if it doesn't exist
|
# Make the directory if it doesn't exist
|
||||||
mkdir -p "$thumbnail_dir"
|
mkdir -p "$thumbnail_dir"
|
||||||
|
|
||||||
|
@ -1780,11 +1778,10 @@ color () {
|
||||||
# Bold {{{
|
# Bold {{{
|
||||||
|
|
||||||
bold () {
|
bold () {
|
||||||
if [ "$bold" == "on" ]; then
|
case "$bold" in
|
||||||
bold="\033[1m"
|
"on") bold="\033[1m" ;;
|
||||||
else
|
"off") bold="" ;;
|
||||||
bold=""
|
esac
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# }}}
|
# }}}
|
||||||
|
@ -2087,9 +2084,10 @@ trap 'printf "\033[?25h"; clear; exit' 2
|
||||||
trap 'printf "\033[?25h"' EXIT
|
trap 'printf "\033[?25h"' EXIT
|
||||||
|
|
||||||
if [ "$image" != "off" ]; then
|
if [ "$image" != "off" ]; then
|
||||||
|
clear
|
||||||
|
|
||||||
# Hide the cursor
|
# Hide the cursor
|
||||||
printf "\033[?25l"
|
printf "\033[?25l"
|
||||||
clear
|
|
||||||
|
|
||||||
# Find w3mimgdisplay
|
# Find w3mimgdisplay
|
||||||
[ "$image_backend" == "w3m" ] && \
|
[ "$image_backend" == "w3m" ] && \
|
||||||
|
@ -2098,6 +2096,7 @@ if [ "$image" != "off" ]; then
|
||||||
|
|
||||||
# Get the image
|
# Get the image
|
||||||
getimage
|
getimage
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Display the image if enabled
|
# Display the image if enabled
|
||||||
|
@ -2137,8 +2136,8 @@ if [ "$image" != "off" ]; then
|
||||||
printf "%b%s" "\033[${lines}H\033[${prompt_height}A"
|
printf "%b%s" "\033[${lines}H\033[${prompt_height}A"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Show the cursor and re-enable line wrap
|
# Re-enable line wrap
|
||||||
printf "%b%s" "\033[?7h\033[?25h"
|
printf "%b%s" "\033[?25h"
|
||||||
|
|
||||||
# If enabled take a screenshot
|
# If enabled take a screenshot
|
||||||
if [ "$scrot" == "on" ]; then
|
if [ "$scrot" == "on" ]; then
|
||||||
|
|
Reference in New Issue