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

From: Eli Zaretskii <[email-masked]>
Date: Wed, 26 Jun 2019 18:25:43 +0300

> From: Filipp Gunbin <[email-masked]>
> Cc: [email-masked]
> Date: Wed, 26 Jun 2019 04:28:37 +0300
> 
> > 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.

If Emacs is continuously redisplaying, it can legitimately redisplay
the line with point (and also some other lines) from time to time.  If
it does, the selection color will go away, because Emacs knows nothing
about it.

So I don't think this is a bug, you simply shouldn't expect the
selection color to stick in such situations on a TTY frame.