Skip to content

Commit

Permalink
Fix overprinting in ProgressUnknown
Browse files Browse the repository at this point in the history
  • Loading branch information
palday authored and IanButterworth committed May 31, 2021
1 parent aae026e commit fb2963f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ProgressMeter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ function updateProgress!(p::ProgressUnknown; showvalues = (), truncate_lines = f
sec_per_iter = elapsed_time / p.counter
msg = @sprintf "%s (%s)" msg speedstring(sec_per_iter)
end
!CLEAR_IJULIA[] && print(p.output, "\n" ^ (p.numprintedvalues))
move_cursor_up_while_clearing_lines(p.output, p.numprintedvalues)
printover(p.output, msg, p.color)
printvalues!(p, showvalues; color = valuecolor, truncate = truncate_lines)
Expand All @@ -420,9 +421,11 @@ function updateProgress!(p::ProgressUnknown; showvalues = (), truncate_lines = f
sec_per_iter = elapsed_time / p.counter
msg = @sprintf "%s (%s)" msg speedstring(sec_per_iter)
end
!CLEAR_IJULIA[] && print(p.output, "\n" ^ (p.numprintedvalues))
move_cursor_up_while_clearing_lines(p.output, p.numprintedvalues)
printover(p.output, msg, p.color)
printvalues!(p, showvalues; color = valuecolor, truncate = truncate_lines)
!CLEAR_IJULIA[] && print(p.output, "\n" ^ (p.numprintedvalues))
flush(p.output)
# Compensate for any overhead of printing. This can be
# especially important if you're running over a slow network
Expand Down

0 comments on commit fb2963f

Please sign in to comment.