From 47be0ea3eeb774102f02b5f85ee974afe6a8170e Mon Sep 17 00:00:00 2001 From: Marc Coquand Date: Wed, 15 May 2024 11:05:27 -0500 Subject: Add way to go back and forth between note and todo view --- lib/headlines.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/headlines.ml') diff --git a/lib/headlines.ml b/lib/headlines.ml index 0633a73..954d0e2 100644 --- a/lib/headlines.ml +++ b/lib/headlines.ml @@ -50,11 +50,12 @@ let rec render t ({ pos; scroll; content; content_pretty } as state) = | `Mouse ((`Press _ | `Drag), (_, y), _) -> render t { state with pos = 0, min y content_length } | `Key (`ASCII '?', []) -> Help_screen.render t { go_back = (fun () -> render t state) } - | `Key (`ASCII 't', []) -> + | `Key (`ASCII '2', []) -> let todo_content = Grep.get_todos () |> Grep.parse_todo_string in let todo_pretty = Grep.pretty_format_todo todo_content in let todo_state = Todos.init + ~goto_headlines:(fun () -> render t state) ~content:(todo_content |> Array.of_list) ~content_pretty:(todo_pretty |> Array.of_list) in -- cgit v1.2.3