From: malc Date: Sat, 23 Feb 2013 10:07:53 +0000 (+0400) Subject: Use correct (local) coordinates for veritcal quadrant calculation X-Git-Tag: v15~25 X-Git-Url: https://repo.or.cz/w/llpp.git/commitdiff_plain/a38a0ec5fe097c7c95faf65a81653e5ae7e6b35a Use correct (local) coordinates for veritcal quadrant calculation --- diff --git a/main.ml b/main.ml index fab4165..b46cfa3 100644 --- a/main.ml +++ b/main.ml @@ -2290,7 +2290,8 @@ let gotopagexy1 pageno x y = else state.x in let py, h = getpageyh pageno in - let y' = py + truncate (top *. float h) in + let pdy = truncate (top *. float h) in + let y' = py + pdy in let dy = y' - state.y in let sy = if x != state.x || not (dy > 0 && dy < wh) @@ -2311,9 +2312,9 @@ let gotopagexy1 pageno x y = then ( let ww = state.winw - state.scrollw in let qx = sx / ww - and qy = sy / wh in + and qy = pdy / wh in let x = qx * ww - and y = qy * wh in + and y = py + qy * wh in let x = if -x + ww > w1 then -(w1-ww) else x and y' = if y + wh > state.maxy then state.maxy - wh else y in let y =