diff -r f02d3c0eed18 -r 0d609ed185ea 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']