From 81fd9f35ce02191094b9809cfba5f5ef46242265 Mon Sep 17 00:00:00 2001 From: malc Date: Mon, 8 Aug 2011 04:19:38 +0400 Subject: [PATCH] And another preload fix --- main.ml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/main.ml b/main.ml index 35b4df9..e6f17c2 100644 --- a/main.ml +++ b/main.ml @@ -561,14 +561,17 @@ let preload () = in if oktopreload then - let rely = yratio state.y in let presentation = conf.presentation in let interpagespace = conf.interpagespace in let maxy = state.maxy in conf.presentation <- false; conf.interpagespace <- 0; state.maxy <- calcheight (); - let y = truncate (float state.maxy *. rely) in + let y = + match state.layout with + | [] -> 0 + | l :: _ -> getpagey l.pageno + in let y = if y < conf.winh then 0 else y - conf.winh in let pages = layout y (conf.winh*3) in List.iter render pages; -- 2.11.4.GIT