Skip to content

Commit

Permalink
Merge pull request #28 from lsdch/main
Browse files Browse the repository at this point in the history
Use actual printer width for elapsed segment instead of fixed width=5
  • Loading branch information
dinosaure authored May 26, 2023
2 parents 76e7c79 + ef9831f commit 9a85313
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/progress/engine/line.ml
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,7 @@ module Make (Platform : Platform.S) = struct

let elapsed ?(pp = Units.Duration.mm_ss) () =
let print_time = Staged.prj (Printer.Internals.to_line_printer pp) in
let width = Printer.print_width pp in
let segment =
Primitives.stateful (fun () ->
let elapsed = Clock.counter () in
Expand All @@ -639,7 +640,7 @@ module Make (Platform : Platform.S) = struct
| `rerender | `finish -> ());
print_time buf !latest
in
Primitives.theta ~width:5 pp)
Primitives.theta ~width pp)
in
Basic segment

Expand Down

0 comments on commit 9a85313

Please sign in to comment.