From a76fb32e7c5815e37b5772f15326f00ec58a322d Mon Sep 17 00:00:00 2001 From: Marc Coquand Date: Tue, 14 May 2024 18:44:58 -0500 Subject: Fix offset --- lib/headlines.ml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'lib/headlines.ml') diff --git a/lib/headlines.ml b/lib/headlines.ml index 853603c..1435c5c 100644 --- a/lib/headlines.ml +++ b/lib/headlines.ml @@ -53,11 +53,18 @@ let rec render t ({ pos; scroll; content; content_pretty } as state) = content |> Array.to_list in - let content = Grep.parse_full_content content in - let content_pretty = Grep.pretty_print_parsed_content content |> Array.of_list in + let full_content = Grep.parse_full_content content in + let full_content_pretty = + Grep.pretty_print_parsed_content full_content |> Array.of_list + in Stitched_article.render t - { pos = 0, 0; content = content |> Array.of_list; content_pretty; scroll = 0 } + { pos = 0, 0 + ; content = full_content |> Array.of_list + ; content_pretty = full_content_pretty + ; scroll = 0 + ; go_back = (fun () -> render t state) + } | `Key (`ASCII 's', []) -> let (input_state : Input_screen.state) = { screen = img -- cgit v1.2.3