Browse Source

Fix crash on python3

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

Change-Id: Id9e889284096e407d59c3938ecd07427ba42e350
tags/1.6.0
Clint Byrum 6 months ago
parent
commit
559f6152c6
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      gertty/mywid.py

+ 1
- 1
gertty/mywid.py View File

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

Loading…
Cancel
Save