From 8cac16b452ed69eeddd257b30e90a1385008e938 Mon Sep 17 00:00:00 2001 From: YishiMichael Date: Tue, 15 Feb 2022 21:59:09 +0800 Subject: [PATCH] Update display_during_execution --- manimlib/utils/tex_file_writing.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/manimlib/utils/tex_file_writing.py b/manimlib/utils/tex_file_writing.py index 35509671..cfc157f4 100644 --- a/manimlib/utils/tex_file_writing.py +++ b/manimlib/utils/tex_file_writing.py @@ -126,8 +126,9 @@ def dvi_to_svg(dvi_file, regen_if_exists=False): def display_during_execution(message): # Only show top line to_print = message.split("\n")[0] - if len(to_print) > 80: - to_print = to_print[:77] + "..." + max_characters = os.get_terminal_size().columns - 1 + if len(to_print) > max_characters: + to_print = to_print[:max_characters - 3] + "..." try: print(to_print, end="\r") yield