This commit is contained in:
Kovid Goyal 2021-11-17 13:55:33 +05:30
parent 6c95828e6e
commit 1a92f99831
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -117,7 +117,7 @@ def without_line_wrap(write: Callable[[str], None]) -> Generator[None, None, Non
@cmd @cmd
def repeat(char: str, count: int) -> str: def repeat(char: str, count: int) -> str:
if count > 1: if count > 5:
return f'{char}\x1b[{count-1}b' return f'{char}\x1b[{count-1}b'
return char * count return char * count