Subject: bug#39678: 'grep --ignore-case --color' does not always color the matches

From: Paul Eggert <[email-masked]>
Date: Tue, 19 Oct 2021 16:23:41 -0700

On 10/19/21 11:36, Tomasz Dziendzielski wrote:
> I found that for optimization purposes common cases in re_string_peek_byte
> are missed if pstr->mbs_allocated is true, thus skipping them also for case
> insensitive.

Unfortunately I've lost context here. Is this patch being proposed to 
improve performance, or to fix a bug?

I don't see how the patch preserves correctness: if pstr->icase is true, 
surely in general we need to look at the translated string, not the 
original.