diff options
author | Marc Coquand <marc@mccd.space> | 2024-05-14 18:44:58 -0500 |
---|---|---|
committer | Marc Coquand <marc@mccd.space> | 2024-05-14 18:44:58 -0500 |
commit | a76fb32e7c5815e37b5772f15326f00ec58a322d (patch) | |
tree | 99047fecba7c7a7f47844e586266579b7a3a2a59 /lib/headlines.ml | |
parent | bdd2c807e52e90b340a8b09c41e7353c52080b46 (diff) | |
download | stitch-a76fb32e7c5815e37b5772f15326f00ec58a322d.tar.gz stitch-a76fb32e7c5815e37b5772f15326f00ec58a322d.tar.bz2 stitch-a76fb32e7c5815e37b5772f15326f00ec58a322d.zip |
Fix offset
Diffstat (limited to 'lib/headlines.ml')
-rw-r--r-- | lib/headlines.ml | 13 |
1 files changed, 10 insertions, 3 deletions
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 |