summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Bedo <cu@cua0.org>2024-10-18 12:20:50 +1100
committerJustin Bedo <cu@cua0.org>2024-10-18 12:21:05 +1100
commita2ee9d0cbfa365315ccfae15a7545d1824ee89b5 (patch)
treecbadc9d5ce160bd047d656c0750601caf4c9c94a
parent18429e70cbcbfdcfb9d4a97e1066adc7c90187cd (diff)
fix forward search scroll bug
-rw-r--r--jterm.hs2
1 files changed, 1 insertions, 1 deletions
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