Browse Source

Fix crash on python3

Python3 does not allow comparing int's to None directly.

Change-Id: Id9e889284096e407d59c3938ecd07427ba42e350
changes/38/619938/1
Clint Byrum 3 years ago
parent
commit
559f6152c6
  1. 2
      gertty/mywid.py

2
gertty/mywid.py

@ -438,7 +438,7 @@ class HyperText(urwid.Text):
pos = self.getPosAtCoords(maxcol, col, row)
index = 0
for item, start, end in self.selectable_items:
if start <= pos <= end:
if pos is not None and start <= pos <= end:
return index
index += 1
return None

Loading…
Cancel
Save