[vim/vim] the underline color is taken for other attributes by some terminals (PR #21412)

8 views
Skip to first unread message

h_east

unread,
Sep 30, 2026, 2:30:02 PM (21 hours ago) Sep 30
to vim/vim, Subscribed
Problem:  The default t_AU and t_8u separate the parameters of SGR 58
          with semicolons.  Windows Terminal and mintty take only
          colons there, and a terminal that does not support the
          underline color takes the numbers for other attributes, such
          as blink, strikethrough or a reset of all attributes.
Solution: Use colons in t_AU and t_8u, as ISO 8613-6 does.

The terminals that support the underline color take the colons, some
only these, such as Windows Terminal (microsoft/terminal#17426) and
mintty. In xterm and libvterm, which do not support it, the underline
keeps the text color and the other attributes stay as they are. t_8f
and t_8b keep the semicolons, which are more widely supported for SGR 38
and 48.

related: #6207


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/21412

Commit Summary

  • 610bd54 the underline color is taken for other attributes by some terminals

File Changes

(4 files)

Patch Links:

—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/21412@github.com>

Christian Brabandt

unread,
Sep 30, 2026, 2:55:33 PM (20 hours ago) Sep 30
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#21412)

Hm, not sure on this. It switches the default value which is a backwards incompatible change. Which means, Vim may break for users who depend on the current behavior (e.g. because their terminals support the ; form)

—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/21412/c5917664550@github.com>

h_east

unread,
Sep 30, 2026, 3:18:36 PM (20 hours ago) Sep 30
to vim/vim, Subscribed
h-east left a comment (vim/vim#21412)

I understand the concern, so I checked who could depend on the ;
form. I read the SGR parsing code of the terminals that implement
SGR 58: iTerm2, Konsole, xterm.js, Contour, kitty, VTE, WezTerm,
Alacritty, Ghostty, foot, Rio, Zellij, tmux, mintty and Windows
Terminal. All of them take 58:2::r:g:b and 58:5:n. None of them
takes only the ; form. mintty and Windows Terminal take only the
: form (microsoft/terminal#17426), and Zellij and tmux use the :
form themselves when they pass the underline color on.

For a terminal without SGR 58 the ; form is the one that breaks
things: the numbers after 58 become other attributes, e.g. blink and
strikethrough from 58;5;9, or a reset from the trailing 0 of
t_8u. That is what #6207 was about. With the : form xterm and
libvterm keep the plain underline and the other attributes.

A user who set t_8u or t_AU is not affected, only the default
changes.

—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/21412/c5918024080@github.com>

Reply all
Reply to author
Forward
0 new messages