]> granicus.if.org Git - neomutt/commit
Fix ansi escape sequences with both reset and color parameters
authorKevin McCarthy <kevin@8t8.us>
Sun, 19 Nov 2017 03:13:08 +0000 (19:13 -0800)
committerRichard Russon <rich@flatcap.org>
Sun, 26 Nov 2017 22:37:25 +0000 (22:37 +0000)
commit387e03d0d3f5c8f69da7523b4616e960d80b772c
tree5f71e92d7d2a2bc1b2b3c0a64881dfc1cd95490e
parentbe12ebceab3c770638a0c3b847579d8933b0d552
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)
pager.c