diff hgext/histedit.py @ 43228:0d609ed185ea

py3: prevent comparison with None in curses histedit (issue6196)
author Denis Laxalde <denis.laxalde@logilab.fr>
date Tue, 15 Oct 2019 12:14:44 +0200
parents 8ff1ecfadcd1
children d8215ff082da
line wrap: on
line diff
--- 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']