hgext/histedit.py
branchstable
changeset 50302 22d7cb8174ef
parent 50257 a301f0fad046
child 50781 0fbc0c978053
--- 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)
                     )