aboutsummaryrefslogtreecommitdiff
path: root/lib/todos.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/todos.ml')
-rw-r--r--lib/todos.ml14
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/todos.ml b/lib/todos.ml
index 0cdbc79..6c99e1c 100644
--- a/lib/todos.ml
+++ b/lib/todos.ml
@@ -15,7 +15,12 @@ type state =
; hide_file_name : bool
}
-let title = I.strf ~attr:A.(st bold) "%s" "Todo" |> I.pad ~l:0 ~t:0
+let title ~tag =
+ match tag with
+ | "" -> I.strf ~attr:A.(st bold) "%s" "Todo" |> I.pad ~l:0 ~t:0
+ | a -> I.strf ~attr:A.(st bold) "%s > %s" "Todo" a |> I.pad ~l:0 ~t:0
+
+
let content_start = 2
let init ~goto_done ~goto_headlines =
@@ -49,7 +54,7 @@ let rec render
; goto_done
; output
; hide_file_name
- ; _
+ ; tag
} as state)
=
let x, y = pos in
@@ -76,7 +81,10 @@ let rec render
(content_pretty |> Basic.array_drop scroll)
in
let open I in
- Array.fold_left (fun sum el -> el </> sum) (title </> dot </> output_info) elements
+ Array.fold_left
+ (fun sum el -> el </> sum)
+ (title ~tag </> dot </> output_info)
+ elements
in
Common.Term.image t img;
let content_end = Array.length content_pretty + (content_start - 1) in