aboutsummaryrefslogtreecommitdiff
path: root/lib/headlines.ml
diff options
context:
space:
mode:
authorMarc Coquand <marc@mccd.space>2024-05-14 12:47:36 -0500
committerMarc Coquand <marc@mccd.space>2024-05-14 12:47:36 -0500
commit20aa8079b40ee794bc84ead7283622c78f49afb5 (patch)
treea1331aa492c350dd15ff653532ddfa7b69437b00 /lib/headlines.ml
parent89817d53ec7dbf5cff9c873afe9b7bc939dbe8c3 (diff)
downloadstitch-20aa8079b40ee794bc84ead7283622c78f49afb5.tar.gz
stitch-20aa8079b40ee794bc84ead7283622c78f49afb5.tar.bz2
stitch-20aa8079b40ee794bc84ead7283622c78f49afb5.zip
Resolve a few bugs
Diffstat (limited to '')
-rw-r--r--lib/headlines.ml2
1 files changed, 1 insertions, 1 deletions
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 ]) -> ()