aboutsummaryrefslogtreecommitdiff
path: root/lib/headlines.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/headlines.ml')
-rw-r--r--lib/headlines.ml7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/headlines.ml b/lib/headlines.ml
index 6482b47..17241ee 100644
--- a/lib/headlines.ml
+++ b/lib/headlines.ml
@@ -18,11 +18,8 @@ type state =
}
let init ~goto_done_view ~goto_todos_view ~regexp =
- let tag = if String.equal regexp "" then None else Some regexp in
let content =
- match tag with
- | None -> Grep.get_headlines () |> Grep.parse_headlines
- | Some tag -> Grep.get_tagged_headlines tag () |> Grep.parse_headlines
+ Grep.get_tagged_headlines regexp () |> Grep.parse_headlines
in
if Array.length content == 0
then (
@@ -37,7 +34,7 @@ let init ~goto_done_view ~goto_todos_view ~regexp =
; goto_done_view
; goto_todos_view
; output = None
- ; tag = ""
+ ; tag = regexp
; hide_file_name = false
})