Skip to content

Commit

Permalink
Fix end of progress bar (#4045)
Browse files Browse the repository at this point in the history
  • Loading branch information
christiangnrd authored Oct 13, 2024
1 parent fbaa2e3 commit 9e37e1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/MiniProgressBars.jl
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function show_progress(io::IO, p::MiniProgressBar; termwidth=nothing, carriagere
max_progress_width = max(0, min(termwidth - textwidth(p.header) - textwidth(progress_text) - 10 , p.width))
n_filled = floor(Int, max_progress_width * perc / 100)
partial_filled = (max_progress_width * perc / 100) - n_filled
n_left = max_progress_width - n_filled - 1
n_left = max_progress_width - n_filled
headers = split(p.header)
to_print = sprint(; context=io) do io
print(io, " "^p.indent)
Expand All @@ -94,7 +94,7 @@ function show_progress(io::IO, p::MiniProgressBar; termwidth=nothing, carriagere
else
printstyled(io, ""; color=:light_black) # Less filled, use ╺
end
printstyled(io, ""^n_left; color=:light_black)
printstyled(io, ""^(n_left-1); color=:light_black)
end
printstyled(io, " "; color=:light_black)
print(io, progress_text)
Expand Down

0 comments on commit 9e37e1b

Please sign in to comment.