diff options
author | Marc Coquand <marc@mccd.space> | 2024-05-15 11:05:27 -0500 |
---|---|---|
committer | Marc Coquand <marc@mccd.space> | 2024-05-15 11:05:27 -0500 |
commit | 47be0ea3eeb774102f02b5f85ee974afe6a8170e (patch) | |
tree | dc24d5c40f0f70d47697fe99ce9250d1187b7226 /lib/headlines.ml | |
parent | ff680702db85b3eec539b3be1931f92cbb89fe8d (diff) | |
download | stitch-47be0ea3eeb774102f02b5f85ee974afe6a8170e.tar.gz stitch-47be0ea3eeb774102f02b5f85ee974afe6a8170e.tar.bz2 stitch-47be0ea3eeb774102f02b5f85ee974afe6a8170e.zip |
Add way to go back and forth between note and todo view
Diffstat (limited to 'lib/headlines.ml')
-rw-r--r-- | lib/headlines.ml | 3 |
1 files changed, 2 insertions, 1 deletions
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 |