Skip to content

Commit 307c53e

Browse files
committed
Improve background color display of prompt in async_printing.py example
1 parent 06c9ade commit 307c53e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/async_printing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def _generate_colored_prompt(self) -> str:
144144
"""
145145
fg_color = random.choice(list(ansi.FG_COLORS.keys()))
146146
bg_color = random.choice(list(ansi.BG_COLORS.keys()))
147-
return ansi.style(self.visible_prompt, fg=fg_color, bg=bg_color)
147+
return ansi.style(self.visible_prompt.rstrip(), fg=fg_color, bg=bg_color) + ' '
148148

149149
def _alerter_thread_func(self) -> None:
150150
""" Prints alerts and updates the prompt any time the prompt is showing """

0 commit comments

Comments
 (0)