If images are disabled don't clear terminal output or mess around with cursor location
This commit is contained in:
parent
822ed78efc
commit
f8ef1b93c7
1 changed files with 11 additions and 10 deletions
21
fetch
21
fetch
|
@ -1122,12 +1122,13 @@ termsize=${termsize/$'\n'/ }
|
|||
lines=${termsize% *}
|
||||
columns=${termsize#* }
|
||||
|
||||
# Get image
|
||||
[ "$image" != "off" ] && getimage
|
||||
if [ "$image" != "off" ]; then
|
||||
getimage
|
||||
|
||||
# Clear the terminal and hide the cursor
|
||||
printf "\e[?25l"
|
||||
clear
|
||||
# Clear the terminal and hide the cursor
|
||||
clear
|
||||
printf "\e[?25l"
|
||||
fi
|
||||
|
||||
# Disable line wrap
|
||||
[ "$line_wrap" == "off" ] && printf '\e[?7l'
|
||||
|
@ -1137,17 +1138,17 @@ colors
|
|||
bold
|
||||
printinfo
|
||||
|
||||
# Display the image
|
||||
[ "$image" != "off" ] && \
|
||||
if [ "$image" != "off" ]; then
|
||||
printf "%b%s" "0;1;$xoffset;$yoffset;$imgsize;$imgsize;;;;;$img\n4;\n3;" |\
|
||||
$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
|
||||
[ "$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
|
||||
[ "$scrot" == "on" ] && takescrot
|
||||
|
||||
|
|
Loading…
Reference in a new issue