GNU bug report logs - #39678
'grep --ignore-case --color' does not always color the matches

Previous Next

Package: grep;

Reported by: Benno Schulenberg <bensberg <at> telfort.nl>

Date: Wed, 19 Feb 2020 15:28:01 UTC

Severity: normal

Merged with 51255, 51256, 51257

Full log


Message #50 received at 39678 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Tomasz Dziendzielski <tomasz.dziendzielski <at> gmail.com>
Cc: 39678 <at> debbugs.gnu.org
Subject: Re: bug#39678: 'grep --ignore-case --color' does not always color the
 matches
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.




This bug report was last modified 3 years and 23 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.