diff options
author | Bert Münnich <ber.t@posteo.de> | 2014-02-04 21:02:02 +0100 |
---|---|---|
committer | Bert Münnich <ber.t@posteo.de> | 2014-02-04 21:02:02 +0100 |
commit | eb82519a80ab3d09fb3294d64a3526c678433d22 (patch) | |
tree | 347b672a4e7b46a0747d22ecaa207d594e71faf3 /commands.c | |
parent | 2e758f78c151b35b316c3286c83e14a435242486 (diff) |
Preserve panning when switching images; fixes issue #131
Diffstat (limited to 'commands.c')
-rw-r--r-- | commands.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -433,14 +433,12 @@ cmdreturn_t i_set_zoom(arg_t a) cmdreturn_t i_fit_to_win(arg_t a) { - cmdreturn_t ret = CMD_INVALID; scalemode_t sm = (scalemode_t) a; - if (mode == MODE_IMAGE) { - if ((ret = img_fit_win(&img, sm))) - img_center(&img); - } - return ret; + if (mode == MODE_IMAGE) + return img_fit_win(&img, sm); + else + return CMD_INVALID; } cmdreturn_t i_fit_to_img(arg_t a) |