rendering: fix crash on empty pages
This commit is contained in:
parent
6b0a622017
commit
b26dad0d0d
|
@ -24,7 +24,7 @@ def render_lines(metalines, window, max_width):
|
||||||
dimensions of the resized window.
|
dimensions of the resized window.
|
||||||
"""
|
"""
|
||||||
num_lines = len(metalines)
|
num_lines = len(metalines)
|
||||||
new_dimensions = num_lines, max_width
|
new_dimensions = max(num_lines, 1), max_width
|
||||||
window.resize(*new_dimensions)
|
window.resize(*new_dimensions)
|
||||||
for line_index, metaline in enumerate(metalines):
|
for line_index, metaline in enumerate(metalines):
|
||||||
try:
|
try:
|
||||||
|
|
Reference in a new issue