page_pad: fix crashes on some fail refresh

would have been better to understand why it crashed but yolo
This commit is contained in:
dece 2021-05-09 15:54:56 +02:00
parent 5aa03da3e8
commit 056616b130

View file

@ -33,7 +33,10 @@ class PagePad:
if x <= 0 or y <= 0:
return
content_position = self.current_line, self.current_column
try:
self.pad.refresh(*content_position, 0, 0, x, y)
except curses.error:
pass
def scroll_v(self, num_lines: int, window_height: int =0):
"""Make the content pad scroll up and down by num_lines.