page_pad: fix crashes on some fail refresh

would have been better to understand why it crashed but yolo
exec
dece 3 years ago
parent 5aa03da3e8
commit 056616b130

@ -33,7 +33,10 @@ class PagePad:
if x <= 0 or y <= 0:
return
content_position = self.current_line, self.current_column
self.pad.refresh(*content_position, 0, 0, x, y)
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.

Loading…
Cancel
Save