Added error handling to micron parser mouse event translator. Fixes #32.

This commit is contained in:
Mark Qvist 2023-08-14 18:02:39 +02:00
parent 22a7acf259
commit 34b3987ded

View file

@ -751,6 +751,7 @@ class LinkableText(urwid.Text):
return x, y
def mouse_event(self, size, event, button, x, y, focus):
try:
if button != 1 or not is_mouse_press(event):
return False
else:
@ -789,3 +790,6 @@ class LinkableText(urwid.Text):
self._emit("change")
return True
except Exception as e:
return False