Subject: Re: bug#56662: 29.0.50; Funny region highlights when highlight-nonselected-windows is t

From: Visuwesh <[email-masked]>
Date: Thu, 21 Jul 2022 16:52:06 +0530

[வியாழன் ஜூலை 21, 2022] Eli Zaretskii wrote:

>>     I kind of wish there was a third value for this user option;
>>     e.g. (setq highlight-nonselected-windows 'lazy) to signify "keep
>>     highlighting as-is when leaving the window, and never update it
>>     until the window becomes current again"? 🤷
>
> How would that work, if you take into consideration that the region is
> between the mark and point?

I can think of one way this could potentially work is by checking if the
mark was made when window was active so making the mark "window-aware"?
I.e., if two windows A and B show the same buffer and the user typed
C-SPC when in window A, then the region would not show up in window B.
Does this make sense?  But I'm not sure if this heuristic will work at
all times as it bends the notion of "active region" way too much.

> In any case, does someone volunteer to work on this?  Because if not,
> we'll just have another bug report that is open forever.

I have no problems closing this but I will let the others speak before I
do.