From: Nicolas Pitre <nico@fluxnic.net>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
Nicolas Pitre <npitre@baylibre.com>
Subject: [PATCH 0/3] vt: make VS16 emoji widening controllable
Date: Mon, 19 Oct 2026 17:16:14 -0400 [thread overview]
Message-ID: <cover.1792443833.git.npitre@baylibre.com> (raw)
The VT turns a single-width character followed by VS16 (U+FE0F) into a
double-width one, as many terminals do for emoji presentation sequences
such as ‼️. Applications that compute widths with wcwidth() consider
VS16 zero-width though, and those tracking the cursor position
themselves get out of sync. With mosh, a single subject line in an
alpine message index was enough to leave the whole screen scrolled by
one line.
Terminals are split roughly evenly on this, so this series keeps the
current behavior by default and provides a way out:
Patch 1 fixes VS16 widening only taking effect after a double-width
character had been displayed, because the Unicode screen memory it
relies on is allocated on demand.
Patch 2 lets applications control VS16 widening with DEC private mode
2027 (from the Contour terminal's Unicode core proposal), with
vt.default_vs16_wide setting its initial and reset state.
Patch 3 adds DECRQM so applications can query mode states, including
2027, rather than waiting for a reply that never comes.
Tested with a program checking the DECRQM replies for all supported modes,
the VS16 width with the mode set, reset and after RIS, with and without
vt.default_vs16_wide=0, and that other CSI ... $ sequences are still
ignored.
diffstat:
.../admin-guide/kernel-parameters.txt | 10 ++
drivers/tty/vt/vt.c | 114 +++++++++++++++++-
include/linux/console_struct.h | 1 +
3 files changed, 124 insertions(+), 1 deletion(-)
--
2.55.0
next reply other threads:[~2026-10-19 21:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-19 21:16 Nicolas Pitre [this message]
2026-10-19 21:16 ` [PATCH 1/3] vt: don't make VS16 widening depend on earlier screen contents Nicolas Pitre
2026-10-19 21:16 ` [PATCH 2/3] vt: add DEC private mode 2027 to control VS16 widening Nicolas Pitre
2026-10-19 21:16 ` [PATCH 3/3] vt: add DECRQM support to report mode states Nicolas Pitre
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1792443833.git.npitre@baylibre.com \
--to=nico@fluxnic.net \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=npitre@baylibre.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®