Subject: Re: bug#36366: 27.0.50; [macOS] Terminal selection garbled when running compilation in adjacent window

From: Filipp Gunbin <[email-masked]>
Date: Wed, 26 Jun 2019 04:28:37 +0300

Eli,

On 25/06/2019 19:13 +0300, Eli Zaretskii wrote:

>> From: Filipp Gunbin <[email-masked]>
>> Date: Mon, 24 Jun 2019 22:06:41 +0300
>>
>> emacs -Q -nw
>>
>> open 2 windows:
>>
>> 1) (above) some long-running compilation process, put point in the end
>> so it's constantly scrolled
>>
>> 2) (below) open some buffer (dired, for example) and make Terminal-level
>> selection, so that the point is inside it
>
> What do you mean by Terminal-level selection?  Is that selection by
> mouse over TTY frame's text?

Yes.

> If so, I don't think Emacs is sensitive to that on macOS, it simply
> doesn't know anything was selected.

Yes, that's what I expected, and still it somehow produces this
behavior...  I don't insist that it's an Emacs bug, but thought that
reporting it is the right place to start.

>> Now, at some point, selection in the lower window becomes garbled,
>> looking like the line is redrawn, but selection not restored.  This can
>> be seen in attached screenshot.  This has transient effect, appearing
>> for a short period of time (few seconds).
>
> Maybe I'm blind, but I don't see any garbage in the screenshot.  Can
> you point me to what I am missing?

The non-selected line with point on it (happens to be "lisp" line in
dired).  Initially I select the whole area (blue), then sometimes the
line where point resides gets deselected (white, as screenshot
illustrates), sometimes it is selected partially - this gives the
blinking effect and happens while output continues to arrive in another
(Emacs) window.  Just to be clear, it's macOS Terminal in full-screen
mode, with Emacs launched in it, with 2 Emacs windows created as stated.

Thanks,
Filipp.