GNU bug report logs - #79298
patch: full color in windows terminal

Previous Next

Package: emacs;

Reported by: Ewan <ewan <at> etown.dev>

Date: Sun, 24 Aug 2025 06:07:02 UTC

Severity: normal

Merged with 79297

Full log


Message #37 received at 79298 <at> debbugs.gnu.org (full text, mbox):

From: Ewan <ewan <at> etown.dev>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 79298 <at> debbugs.gnu.org
Subject: Re: bug#79298: patch: full color in windows terminal
Date: Wed, 03 Sep 2025 09:35:37 +0000
[Message part 1 (text/plain, inline)]
I'm still waiting on a disclaimer, but in the meantime, I have attached 
the revised patch (with a slightly broadened scope).

Basically, it's much smoother to do a wholesale migration from the Windows
Console API to ASCII control sequences, controlled by an auto-set feature flag.

However,

(1) ASCII control sequences require moving the cursor during redisplay,
(2) the Windows system cursor picks up these movements, and
(3) redisplay is slow enough that cursor jumps to the echo area are perceptible.

So, I've also implemented some changes to cursor handling in Windows TTY.

If the existing variable 'w32-use-visible-system-caret is nil (the default),
then we always hide the system cursor, and Emacs handles cursor display.
This is the smoothest UX, currently limited to a non-blinking solid cursor.
Otherwise, the system cursor is used, but we hide it momentarily when
redisplaying the echo area, resulting in a slight cursor flicker in-place
(the alternative being a noticeable "flashing" of the cursor in the echo area).

More details in the included news entries and changes to the manual.

Logs:
* doc/emacs/cmdargs.texi: Added 24-bit option and note re: --color on Windows.
* doc/emacs/msdos.texi: Documented VT sequence migration and feature flag(s).
* etc/NEWS.30: Entries on VT sequences (color) and cursor display.
* lisp/term/tty-colors.el: Added '24bit cell in tty-color-mode-alist.
* lisp/term/w32console.el: Changes/additions enabling VT sequence migration.
* src/dispnew.c: WINDOWSNT-specific segments for w32- and Emacs-drawn cursor(s).
* src/term.c: Extended existing TTY color infrastructure to include WINDOWSNT.
* src/termchar.h: Added extern decl. (tty_setup_colors) for use in w32console.c.
* src/w32console.c: Migration to ASCII control sequences (feature-flagged).
* src/xdisp.c: Modified #if condition to call set_tty_color_mode for WINDOWSNT.
[0001-Windows-TTY-Migration-to-Virtual-Terminal-Sequences.patch (application/octet-stream, attachment)]

This bug report was last modified 6 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.