From 20aa8079b40ee794bc84ead7283622c78f49afb5 Mon Sep 17 00:00:00 2001 From: Marc Coquand Date: Tue, 14 May 2024 12:47:36 -0500 Subject: Resolve a few bugs --- lib/headlines.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/headlines.ml') diff --git a/lib/headlines.ml b/lib/headlines.ml index f32b6ef..aec8567 100644 --- a/lib/headlines.ml +++ b/lib/headlines.ml @@ -36,7 +36,7 @@ let rec headline_screen t ({ tag; pos; scroll; content; content_pretty } as stat in let scroll_down () = let scroll = if y - scroll >= size_y - 1 then scroll + 1 else scroll in - headline_screen t @@ { state with pos = x, min (y + 1) content_length; scroll } + headline_screen t @@ { state with pos = x, min (y + 1) (content_length - 1); scroll } in match Common.Term.event t with | `End | `Key (`Escape, []) | `Key (`ASCII 'q', []) | `Key (`ASCII 'C', [ `Ctrl ]) -> () -- cgit v1.2.3