From: Kevin McCarthy Date: Sun, 19 Nov 2017 03:13:08 +0000 (-0800) Subject: Fix ansi escape sequences with both reset and color parameters X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=387e03d0d3f5c8f69da7523b4616e960d80b772c;p=neomutt Fix ansi escape sequences with both reset and color parameters The initial 0 "reset/normal" was setting attr = ANSI_OFF, which was subsequently being or'ed with ANSI_COLOR. The color resolution was then checking for the ANSI_OFF bit and turning all coloring off, even though ANSI_COLOR was also set. Change the color resolution to check for "attr == ANSI_OFF" instead, so the color isn't reset unless the reset occurs last in the sequence. (closes #3689) --- diff --git a/pager.c b/pager.c index b07dd91da..96cf4d218 100644 --- a/pager.c +++ b/pager.c @@ -340,7 +340,7 @@ static void resolve_color(struct Line *line_info, int n, int cnt, int flags, { color ^= A_BLINK; } - else if (a->attr & ANSI_OFF) + else if (a->attr == ANSI_OFF) { a->attr = 0; }