[PATCH] histedit: fix diff colors
Joerg Sonnenberger
joerg at bec.de
Tue Oct 25 19:48:22 UTC 2022
On Mon, Oct 24, 2022 at 05:05:18PM -0400, Jordi Gutiérrez Hermoso wrote:
> diff --git a/hgext/histedit.py b/hgext/histedit.py
> --- a/hgext/histedit.py
> +++ b/hgext/histedit.py
> @@ -1428,11 +1428,11 @@ pgup/K: move patch up, pgdn/J: move patc
> for y in range(0, length):
> line = output[y]
> if diffcolors:
> - if line and line[0] == b'+':
> + if line and line.startswith(b'+'):
> win.addstr(
> y, 0, line, curses.color_pair(COLOR_DIFF_ADD_LINE)
> )
> - elif line and line[0] == b'-':
> + elif line and line.startswith(b'-'):
> win.addstr(
> y, 0, line, curses.color_pair(COLOR_DIFF_DEL_LINE)
> )
Do we still need the "line and" part of the check?
Joerg
More information about the Mercurial-devel
mailing list