aboutsummaryrefslogtreecommitdiff
path: root/lib/headlines.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/headlines.ml')
-rw-r--r--lib/headlines.ml13
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