Skip to content

Commit 14142c3

Browse files
committed
fix incorrect repeat counts
1 parent 727260e commit 14142c3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

kittens/tui/operations.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,9 @@ def without_line_wrap(write: Callable[[str], None]) -> Generator[None, None, Non
117117

118118
@cmd
119119
def repeat(char: str, count: int) -> str:
120-
return f'{char}\x1b[{abs(count)}b'
120+
if count > 1:
121+
return f'{char}\x1b[{count-1}b'
122+
return char * count
121123

122124

123125
@cmd

0 commit comments

Comments
 (0)