aboutsummaryrefslogtreecommitdiff
path: root/commands.c
diff options
context:
space:
mode:
authorBert Münnich <ber.t@posteo.de>2014-02-04 21:02:02 +0100
committerBert Münnich <ber.t@posteo.de>2014-02-04 21:02:02 +0100
commiteb82519a80ab3d09fb3294d64a3526c678433d22 (patch)
tree347b672a4e7b46a0747d22ecaa207d594e71faf3 /commands.c
parent2e758f78c151b35b316c3286c83e14a435242486 (diff)
Preserve panning when switching images; fixes issue #131
Diffstat (limited to 'commands.c')
-rw-r--r--commands.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/commands.c b/commands.c
index 22ac788..8234f08 100644
--- a/commands.c
+++ b/commands.c
@@ -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)