From a2ee9d0cbfa365315ccfae15a7545d1824ee89b5 Mon Sep 17 00:00:00 2001 From: Justin Bedo Date: Fri, 18 Oct 2024 12:20:50 +1100 Subject: fix forward search scroll bug --- jterm.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jterm.hs b/jterm.hs index d63ee73..8b1700d 100644 --- a/jterm.hs +++ b/jterm.hs @@ -322,7 +322,7 @@ handleEvent display win bgcolour fgcolour linecolour selcolour font event = do (_, _, _, _, m, _, _) <- lift $ getGeometry display win let (height, width) = fontSize display font pageheight = fromIntegral m `div` fromIntegral height - put $ b {cursor = (p, p + end - start), pos = max (pos b) $ R.lengthInLines (R.splitAt p (content b) & fst) -. pageheight + 1} + put $ b {cursor = (p, p + end - start), pos = max (pos b) $ R.lengthInLines (R.splitAt p (content b) & fst) + 1 -. pageheight} Nothing -> pure () (0, 2) -> -- middle click down -- cgit v1.2.3