py3: prevent comparison with None in curses histedit (issue6196)
authorDenis Laxalde <denis.laxalde@logilab.fr>
Tue, 15 Oct 2019 12:14:44 +0200
changeset 43228 0d609ed185ea
parent 43227 f02d3c0eed18
child 43229 9fa941faef94
py3: prevent comparison with None in curses histedit (issue6196)
hgext/histedit.py
--- a/hgext/histedit.py	Sat Oct 12 11:30:25 2019 -0700
+++ b/hgext/histedit.py	Tue Oct 15 12:14:44 2019 +0200
@@ -1259,7 +1259,7 @@
         return E_RESIZE
 
     lookup_ch = ch
-    if b'0' <= ch <= b'9':
+    if ch is not None and b'0' <= ch <= b'9':
         lookup_ch = b'0'
 
     curmode, prevmode = state[b'mode']