aboutsummaryrefslogtreecommitdiff
path: root/lib/done.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/done.ml')
-rw-r--r--lib/done.ml15
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/done.ml b/lib/done.ml
index 6a60fd1..815f663 100644
--- a/lib/done.ml
+++ b/lib/done.ml
@@ -73,17 +73,22 @@ let rec render
| `Mouse ((`Press _ | `Drag), (_, y), _) ->
render t { state with pos = 0, min y content_end }
| `Key (`ASCII '?', []) -> Help_screen.render t { go_back = (fun () -> render t state) }
- | `Key (`ASCII 's', []) ->
+ | `Key (`ASCII 'r', []) ->
let (input_state : Input_screen.state) =
{ screen = img
; user_input = ""
- ; prompt = "GREP: "
+ ; prompt = "REGEXP: "
; on_enter =
(fun tag ->
- let content = Grep.get_tagged_headlines tag () |> Grep.parse_headlines in
- let content_pretty = Grep.pretty_format content in
+ let content = Grep.get_tagged_done tag () |> Grep.parse_todo_string in
+ let content_pretty = Grep.pretty_format_todo content in
Common.Term.cursor t None;
- render t { state with content; content_pretty })
+ render
+ t
+ { state with
+ content = content |> Array.of_list
+ ; content_pretty = content_pretty |> Array.of_list
+ })
; on_cancel =
(fun _ ->
Common.Term.cursor t None;