Subject: 29.0.50; Regression in query-replace prompt

From: Juri Linkov <[email-masked]>
Date: Mon, 25 Apr 2022 18:37:22 +0300

X-Debbugs-Cc: Augusto Stoffel <[email-masked]>

I noticed a recent regression after minibuffer-lazy-highlight changes:

0. emacs -Q
1. perform one query-replace to add some FROM and TO to its history:
   M-% a RET b RET
2. check that isearch still works in the minibuffer history:
   M-% C-r a
3. activate the region, e.g. C-SPC and move point
4. try to isearch in the history again:
   M-% C-r a

It fails with: [Failing I-search backward: a]

Maybe this is caused by minibuffer-lazy-highlight-setup
that sets filter to replace--region-filter in the minibuffer
instead of the original buffer?