aboutsummaryrefslogtreecommitdiff
path: root/lib/todos.ml
diff options
context:
space:
mode:
authorMarc Coquand <marc@mccd.space>2024-06-10 11:58:16 -0500
committerMarc Coquand <marc@mccd.space>2024-06-10 11:58:16 -0500
commit598ce9ecef91264bd78555bd5b6fcca97a073d95 (patch)
tree57680b7d93dfe233584216bec39642d31c9c011b /lib/todos.ml
parent870a4b7792572c1bb28c2dcf7035d5859de3a6da (diff)
downloadstitch-598ce9ecef91264bd78555bd5b6fcca97a073d95.tar.gz
stitch-598ce9ecef91264bd78555bd5b6fcca97a073d95.tar.bz2
stitch-598ce9ecef91264bd78555bd5b6fcca97a073d95.zip
Hide file names by default
Diffstat (limited to '')
-rw-r--r--lib/todos.ml11
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 =