If images are disabled don't clear terminal output or mess around with cursor location
This commit is contained in:
parent
822ed78efc
commit
f8ef1b93c7
21
fetch
21
fetch
|
@ -1122,12 +1122,13 @@ termsize=${termsize/$'\n'/ }
|
||||||
lines=${termsize% *}
|
lines=${termsize% *}
|
||||||
columns=${termsize#* }
|
columns=${termsize#* }
|
||||||
|
|
||||||
# Get image
|
if [ "$image" != "off" ]; then
|
||||||
[ "$image" != "off" ] && getimage
|
getimage
|
||||||
|
|
||||||
# Clear the terminal and hide the cursor
|
# Clear the terminal and hide the cursor
|
||||||
printf "\e[?25l"
|
clear
|
||||||
clear
|
printf "\e[?25l"
|
||||||
|
fi
|
||||||
|
|
||||||
# Disable line wrap
|
# Disable line wrap
|
||||||
[ "$line_wrap" == "off" ] && printf '\e[?7l'
|
[ "$line_wrap" == "off" ] && printf '\e[?7l'
|
||||||
|
@ -1137,17 +1138,17 @@ colors
|
||||||
bold
|
bold
|
||||||
printinfo
|
printinfo
|
||||||
|
|
||||||
# Display the image
|
if [ "$image" != "off" ]; then
|
||||||
[ "$image" != "off" ] && \
|
|
||||||
printf "%b%s" "0;1;$xoffset;$yoffset;$imgsize;$imgsize;;;;;$img\n4;\n3;" |\
|
printf "%b%s" "0;1;$xoffset;$yoffset;$imgsize;$imgsize;;;;;$img\n4;\n3;" |\
|
||||||
$w3m_img_path
|
$w3m_img_path
|
||||||
|
|
||||||
|
# Move cursor to bottom and redisplay it.
|
||||||
|
printf "%b%s" "\e[${lines}H\e[${prompt_height}A\e[?25h"
|
||||||
|
fi
|
||||||
|
|
||||||
# Enable line wrap again
|
# Enable line wrap again
|
||||||
[ "$line_wrap" == "off" ] && printf '\e[?7h'
|
[ "$line_wrap" == "off" ] && printf '\e[?7h'
|
||||||
|
|
||||||
# Move cursor to bottom and redisplay it.
|
|
||||||
printf "%b%s" "\e[${lines}H\e[${prompt_height}A\e[?25h"
|
|
||||||
|
|
||||||
# If enabled take a screenshot
|
# If enabled take a screenshot
|
||||||
[ "$scrot" == "on" ] && takescrot
|
[ "$scrot" == "on" ] && takescrot
|
||||||
|
|
||||||
|
|
Reference in New Issue