From 08f55b17cbf2f5bb3ccd1ec3dd1d5db9d5994a20 Mon Sep 17 00:00:00 2001 From: malc Date: Tue, 9 Aug 2011 06:09:32 +0400 Subject: [PATCH] And tweak pgdown in bird's eye one more time --- main.ml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/main.ml b/main.ml index 93d3e6d..d3af2f6 100644 --- a/main.ml +++ b/main.ml @@ -1855,8 +1855,26 @@ let birdseyespecial key x y (conf, leftx, pageno, hooverpageno, anchor) = | Glut.KEY_PAGE_DOWN -> begin match List.rev state.layout with | l :: _ -> - state.mode <- Birdseye (conf, leftx, l.pageno, hooverpageno, anchor); - gotoy (clamp (l.pagedispy + l.pageh)) + let layout = layout (state.y + conf.winh) conf.winh in + begin match layout with + | [] -> + let incr = l.pageh - l.pagevh in + if incr = 0 + then ( + state.mode <- + Birdseye ( + conf, leftx, state.pagecount - 1, hooverpageno, anchor + ); + Glut.postRedisplay (); + ) + else gotoy (clamp (incr + conf.interpagespace*2)); + + | l :: _ -> + state.mode <- + Birdseye (conf, leftx, l.pageno, hooverpageno, anchor); + gotopage1nonav l.pageno 0; + end + | [] -> gotoy (clamp conf.winh) end; -- 2.11.4.GIT