diff -r 9fc0d244a753 -r 22d7cb8174ef hgext/histedit.py --- a/hgext/histedit.py Wed Mar 15 05:49:56 2023 +0100 +++ b/hgext/histedit.py Thu Oct 27 17:34:02 2022 -0400 @@ -1427,11 +1427,11 @@ for y in range(0, length): line = output[y] if diffcolors: - if line and line[0] == b'+': + if line.startswith(b'+'): win.addstr( y, 0, line, curses.color_pair(COLOR_DIFF_ADD_LINE) ) - elif line and line[0] == b'-': + elif line.startswith(b'-'): win.addstr( y, 0, line, curses.color_pair(COLOR_DIFF_DEL_LINE) )