aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMarc Coquand <marc@mccd.space>2024-05-23 13:35:15 -0500
committerMarc Coquand <marc@mccd.space>2024-05-23 13:35:15 -0500
commit60d41f32aff828aee0dd2e04d1c8e0e7fe6764a9 (patch)
tree73a21a27e92323acb871102ef5a9e3933842c71d /lib
parenteefbe31e308d3c7e031d757951f379c899ca62f6 (diff)
downloadstitch-60d41f32aff828aee0dd2e04d1c8e0e7fe6764a9.tar.gz
stitch-60d41f32aff828aee0dd2e04d1c8e0e7fe6764a9.tar.bz2
stitch-60d41f32aff828aee0dd2e04d1c8e0e7fe6764a9.zip
Resolve issue with tag not showing if using -t tag
Diffstat (limited to 'lib')
-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
})