Subject: Re: bug#57434: 28.1.91; Terminal Emacs Mac OS flickering.

From: Eli Zaretskii <[email-masked]>
Date: Mon, 29 Aug 2022 22:17:06 +0300

> From: Dmitrii Kuragin <[email-masked]>
> Date: Mon, 29 Aug 2022 12:04:38 -0700
> Cc: Gerd Möllmann <[email-masked]>, 
> 	[email-masked]
> 
>  More generally, we need to understand why insertion cause flickering
>  whereas writing to the terminal does not.
> 
> I agree.
> 
> Let's ignore what I said about flushing. My assumption was that we draw the terminal content in multiple steps
> in different places. For example, we remove some lines, then do some logic, then we draw chars on top of it.
> So, if we have a lag between the operations and the terminal refreshes the screen we see only part of the
> content. But, as I said. Let's ignore that and if you have any guidance on how I can debug it further, it would be
> awesome. 
> 
> Flickering is consistent for some specific area. If I scroll between 2 lines, back-and-forth Emacs flickers
> consistently.
> 
> What would be my next steps to give more debug information?

Can you try some other terminal emulator?  I'm interested to know
whether all of them flicker, or just some.

Another idea is to disable the insert/delete optimization entirely, by
making sure the line_ins_del_ok flag of the terminal is reset.  The
question, of course, is what to base this on -- could be macOS or just
some specific terminal type.