GNU bug report logs -
#25751
Query replace lazy highlighting
Previous Next
Full log
View this message in rfc822 format
> When query-replacing and confirming, matches get unhighlighted, and then
> highlighted again, which is very distracting. E.g. open a file, M-% a ->
> a, y, other matches of a get unhighlighted then highlighted again.
>
> (setq lazy-highlight-initial-delay 0) (shouldn't it be default by the
> way, at least on graphical displays?) reduces the problem but does not
> eliminate it (it produces small flickers). There's
> lazy-highlight-cleanup, but that disables cleanup completely, which I
> don't want.
>
> Can't this be eliminated?
The reason why it works this way is because lazy-highlight is not yet
optimized to handle changes: it needs to dehighlight the replaced text,
and to add highlighting in the new replacing text after every replacement.
I see no simpler solution than to write a new function with a name like
‘isearch-lazy-highlight-update-in-region’ that given the region boundaries
of the last replacement will rehighlight matches in that region.
This bug report was last modified 8 years and 142 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.