All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] vt: make VS16 emoji widening controllable
@ 2026-10-19 21:16 Nicolas Pitre
  2026-10-19 21:16 ` [PATCH 1/3] vt: don't make VS16 widening depend on earlier screen contents Nicolas Pitre
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Nicolas Pitre @ 2026-10-19 21:16 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Jiri Slaby, linux-serial, linux-kernel, Nicolas Pitre

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-10-19 21:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-19 21:16 [PATCH 0/3] vt: make VS16 emoji widening controllable Nicolas Pitre
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:23   ` sashiko-bot
2026-10-19 21:16 ` [PATCH 2/3] vt: add DEC private mode 2027 to control VS16 widening Nicolas Pitre
2026-10-19 21:19   ` sashiko-bot
2026-10-19 21:16 ` [PATCH 3/3] vt: add DECRQM support to report mode states Nicolas Pitre
2026-10-19 21:22   ` sashiko-bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.