From 60d41f32aff828aee0dd2e04d1c8e0e7fe6764a9 Mon Sep 17 00:00:00 2001 From: Marc Coquand Date: Thu, 23 May 2024 13:35:15 -0500 Subject: Resolve issue with tag not showing if using -t tag --- lib/headlines.ml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'lib') 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 }) -- cgit v1.2.3