Skip to content

Commit 8cac16b

Browse files
committed
Update display_during_execution
1 parent 719cd8c commit 8cac16b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

manimlib/utils/tex_file_writing.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,9 @@ def dvi_to_svg(dvi_file, regen_if_exists=False):
126126
def display_during_execution(message):
127127
# Only show top line
128128
to_print = message.split("\n")[0]
129-
if len(to_print) > 80:
130-
to_print = to_print[:77] + "..."
129+
max_characters = os.get_terminal_size().columns - 1
130+
if len(to_print) > max_characters:
131+
to_print = to_print[:max_characters - 3] + "..."
131132
try:
132133
print(to_print, end="\r")
133134
yield

0 commit comments

Comments
 (0)