From aa0ed8c335e109cd6971269ad95abe5538354148 Mon Sep 17 00:00:00 2001 From: malc Date: Mon, 8 Aug 2011 03:13:37 +0400 Subject: [PATCH] Fix repositioning when changing interpagespace --- main.ml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/main.ml b/main.ml index 18a3bc5..c91b4e7 100644 --- a/main.ml +++ b/main.ml @@ -1061,10 +1061,16 @@ let optentry text key = | 'S' -> let ondone s = try + let pageno, py = + match state.layout with + | [] -> 0, 0 + | l :: _ -> + l.pageno, l.pagey + in conf.interpagespace <- int_of_string s; - let rely = yratio state.y in state.maxy <- calcheight (); - gotoy (truncate (float state.maxy *. rely)); + let y = getpagey pageno in + gotoy (y + py) with exc -> state.text <- Printf.sprintf "bad integer `%s': %s" s (Printexc.to_string exc) -- 2.11.4.GIT