feh
feh copied to clipboard
zoom_fit does nothing if --zoom fill was passed
Steps to reproduce
- Create or obtain a large image file (e.g, this photo of a ship)
- Open it using
feh --zoom fill - Press
/to callzoom_fit
Expected behaviour: the image is zoomed so as to fit in the window Actual behaviour: the image remains zoomed to fill the window (not all of it is shown; it doesn't fit.)
If --zoom max or -Z is passed, switching between fill and fit works as expected.
Version information:
% (feh --version 2> /dev/null ; uname -a)
feh version 3.8
Compile-time switches: curl exif inotify help stat64 verscmp xinerama
Linux naoetsu 5.17.9-arch1-1 #1 SMP PREEMPT Wed, 18 May 2022 17:30:11 +0000 x86_64 GNU/Linux
Script to automatically demonstrate the bugged behaviour
#!/usr/bin/sh
url="https://upload.wikimedia.org/wikipedia/commons/8/82/USS_Johnston_%28DD-557%29_underway_on_27_October_1943_%28NH_63495%29.jpg"
fname=ship.jpg
if [ ! -f $fname ]; then
wget $url -O $fname
fi
delay=2500
feh --info "echo 'No zoom'" $fname &
sleep 1;
xdotool type --delay $delay \! \* / q
sleep 1;
feh --info "echo '--zoom fill'" --zoom fill $fname &
sleep 1;
xdotool type --delay $delay / \! q
sleep 1;
feh --info "echo '--zoom max'" --zoom max $fname &
sleep 1;
xdotool type --delay $delay \* \! / q