From 042dd55c3080d45d12df879a4d4a4c50eadd6106 Mon Sep 17 00:00:00 2001 From: malc Date: Tue, 16 Feb 2016 05:05:08 +0300 Subject: [PATCH] Make autoscroll respect maxfit setting Addresses #21 I have vague recollection that this was by design, then again maybe not. --- main.ml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.ml b/main.ml index 0be1eb7..b0c1f71 100644 --- a/main.ml +++ b/main.ml @@ -6639,10 +6639,11 @@ let () = match state.autoscroll with | Some step when step != 0 -> let y = state.y + step in + let fy = if conf.maxhfit then state.winh else 0 in let y = if y < 0 - then state.maxy - else if y >= state.maxy then 0 else y + then state.maxy - fy + else if y >= state.maxy - fy then 0 else y in if state.mode = View then gotoy_and_clear_text y -- 2.11.4.GIT