Skip to content

Commit fb2963f

Browse files
paldayIanButterworth
authored andcommitted
Fix overprinting in ProgressUnknown
1 parent aae026e commit fb2963f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/ProgressMeter.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,7 @@ function updateProgress!(p::ProgressUnknown; showvalues = (), truncate_lines = f
399399
sec_per_iter = elapsed_time / p.counter
400400
msg = @sprintf "%s (%s)" msg speedstring(sec_per_iter)
401401
end
402+
!CLEAR_IJULIA[] && print(p.output, "\n" ^ (p.numprintedvalues))
402403
move_cursor_up_while_clearing_lines(p.output, p.numprintedvalues)
403404
printover(p.output, msg, p.color)
404405
printvalues!(p, showvalues; color = valuecolor, truncate = truncate_lines)
@@ -420,9 +421,11 @@ function updateProgress!(p::ProgressUnknown; showvalues = (), truncate_lines = f
420421
sec_per_iter = elapsed_time / p.counter
421422
msg = @sprintf "%s (%s)" msg speedstring(sec_per_iter)
422423
end
424+
!CLEAR_IJULIA[] && print(p.output, "\n" ^ (p.numprintedvalues))
423425
move_cursor_up_while_clearing_lines(p.output, p.numprintedvalues)
424426
printover(p.output, msg, p.color)
425427
printvalues!(p, showvalues; color = valuecolor, truncate = truncate_lines)
428+
!CLEAR_IJULIA[] && print(p.output, "\n" ^ (p.numprintedvalues))
426429
flush(p.output)
427430
# Compensate for any overhead of printing. This can be
428431
# especially important if you're running over a slow network

0 commit comments

Comments
 (0)