From eb82519a80ab3d09fb3294d64a3526c678433d22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bert=20M=C3=BCnnich?= Date: Tue, 4 Feb 2014 21:02:02 +0100 Subject: Preserve panning when switching images; fixes issue #131 --- commands.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'commands.c') 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) -- cgit v1.2.3