Subject: Re: bug#61601: [PATCH] * lisp/isearch.el (minibuffer-lazy-highlight-setup): Use cursor-in-echo-area

From: Augusto Stoffel <[email-masked]>
Date: Sat, 18 Feb 2023 22:40:13 +0100

On Sat, 18 Feb 2023 at 21:18, Eli Zaretskii wrote:

>> Cc: [email-masked]
>> From: Juri Linkov <[email-masked]>
>> Date: Sat, 18 Feb 2023 20:44:40 +0200
>> 
>> > I wasn't aware of the variable cursor-in-echo-area when I originally
>> > wrote this function, but it's a much less drastic measure than setting
>> > inhibit-redisplay.
>> 
>> I don't know if Eli will allow this to the emacs-29 branch.
>
> Can you explain how the old and the new code prevent "flickering" in
> that place?

The flickering happens because the cursor briefly moves from the
minibuffer to the minibuffer selected window when the lazy highlighting
is done (e.g. after typing a character in the C-M-% regexp query).

The previous solution was to inhibit redisplay during that brief period.
The new and better solution is to just set cursor-in-echo-area, which
does exactly what we want to happen.