Subject: Re: bug#79298: patch: full color in windows terminal

From: Eli Zaretskii <[email-masked]>
Date: Thu, 04 Sep 2025 13:11:54 +0300

> Date: Thu, 04 Sep 2025 09:40:18 +0000
> From: Ewan <[email-masked]>
> Cc: [email-masked]
> 
> 
> > I'm not yet sure I understand the issues and the proposed solutions.
> > 
> > Let's back up a notch: Emacs in -nw mode on Unix systems already hides
> > the cursor before writing glyphs, see tty_write_glyphs_1 and
> > tty_write_glyphs_with_face. Why cannot we do the same in
> > w32con_write_glyphs and w32con_write_glyphs_with_face, when
> > WriteConsole is in use? Or what are the problems with doing that?
> 
> On Unix systems, this rapid off/on cycle appears to be fast enough
> to be imperceptible. Not so on Windows. My understanding is that
> cursor changes are just less efficient on Windows.

Why "rapid"?  AFAICT, we hide the cursor before the first write, and
unhide it only in update_end_hook, i.e. when we finished updating the
entire frame.

> Perhaps some visuals will help.

Thanks, but they don't.  Movies that show screens don't work well IME
because the basic timing on the original system is basically lost.

Tell you what: why don't you post a patch that includes all we were
talking about, i.e. leaving most of the code not related to colors
unmodified and using the system cursor, and including the call to
hide/show the cursor modeled after what the Unix systems do, and we
then take it from there?  Maybe I'm missing something important here,
but then I should be able to see if after applying the patch and
building Emacs.

Thanks.