From b26dad0d0daada8efa72201a04aca3f0b600123b Mon Sep 17 00:00:00 2001 From: dece Date: Fri, 7 May 2021 21:54:09 +0200 Subject: [PATCH] rendering: fix crash on empty pages --- bebop/rendering.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bebop/rendering.py b/bebop/rendering.py index 3ee6581..f84469a 100644 --- a/bebop/rendering.py +++ b/bebop/rendering.py @@ -24,7 +24,7 @@ def render_lines(metalines, window, max_width): dimensions of the resized window. """ num_lines = len(metalines) - new_dimensions = num_lines, max_width + new_dimensions = max(num_lines, 1), max_width window.resize(*new_dimensions) for line_index, metaline in enumerate(metalines): try: