diff options
Diffstat (limited to '')
-rw-r--r-- | lib/todos.ml | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/todos.ml b/lib/todos.ml index 4ee911d..94fb5c8 100644 --- a/lib/todos.ml +++ b/lib/todos.ml @@ -25,7 +25,8 @@ let content_start = 2 let init ~goto_done ~goto_headlines = let content = Grep.get_todos () |> Grep.parse_todo_string in - let content_pretty = Grep.pretty_format_todo content in + let hide_file_name = true in + let content_pretty = Grep.pretty_format_todo ~hide_file_name content in { pos = 0, content_start ; scroll = 0 ; content = content |> Array.of_list @@ -34,17 +35,17 @@ let init ~goto_done ~goto_headlines = ; goto_done ; output = None ; tag = "" - ; hide_file_name = false + ; hide_file_name } -let load_todos ?(hide_file_name = false) () = +let load_todos ~hide_file_name () = let todo_content = Grep.get_todos () |> Grep.parse_todo_string in let todo_pretty = Grep.pretty_format_todo ~hide_file_name todo_content in todo_content, todo_pretty -let refresh ?(hide_file_name = false) tag = +let refresh ~hide_file_name tag = let content = Grep.get_tagged_todo tag () |> Grep.parse_todo_string in let content_pretty = Grep.pretty_format_todo ~hide_file_name content in content, content_pretty @@ -145,7 +146,7 @@ let rec render t { state with content = content |> Array.of_list - ; content_pretty = content_pretty |> Array.of_list + ; content_pretty = content_pretty ~hide_file_name |> Array.of_list ; tag }) ; on_cancel = |