diff --git a/hlna.py b/hlna.py index 3f01062..f26f28c 100755 --- a/hlna.py +++ b/hlna.py @@ -161,10 +161,17 @@ def print_line(*text, flag="", sep=" ", end="\n"): len_text = str(*text) len_text = len_text.split("\n") - max_length = max(len(str(string)) for string in len_text) + 2 - print(color + "." * max_length) + max_string = max(len(str(string)) for string in len_text) + 2 + max_length = shutil.get_terminal_size() + max_length = max_length[0] + if max_string > max_length: + len_dots = max_length + else: + len_dots = max_string + + print(color + "." * len_dots) print(color, *text, sep=sep, end=end) - print(color + "." * max_length + colorama.Style.RESET_ALL) + print(color + "." * len_dots + colorama.Style.RESET_ALL) def zmeyuka(stdscr, func):