This commit is contained in:
Kovid Goyal 2021-11-17 13:16:50 +05:30
parent ad804cc01e
commit 727260e69b
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -30,10 +30,7 @@ def render_progress_bar(frac: float, width: int = 80) -> str:
fl += 1 fl += 1
needs_break = False needs_break = False
ans = styled(filled, fg='blue') ans = styled(filled, fg='blue')
unfilled = '' unfilled = '🬇' if width > fl and needs_break else ''
if width > fl:
if needs_break:
unfilled += '🬇'
filler = width - fl - len(unfilled) filler = width - fl - len(unfilled)
if filler > 0: if filler > 0:
unfilled += repeat('🬋', filler) unfilled += repeat('🬋', filler)