]> git.ipfire.org Git - thirdparty/vim.git/commit
runtime(doc): use standard SGR format at :h xterm-true-color
authorAndrea Pappacoda <andrea@pappacoda.it>
Tue, 31 Dec 2024 09:46:22 +0000 (10:46 +0100)
committerChristian Brabandt <cb@256bit.org>
Tue, 31 Dec 2024 09:46:22 +0000 (10:46 +0100)
commit34e271b32111cca3245283b7f9de2fe821982510
treeb7b87c4cd0d941a15b592dc916b6af95e37cafb3
parent39a4eb0b2ca901b59800fad086550053556e59dc
runtime(doc): use standard SGR format at :h xterm-true-color

By default, Vim uses the non-standard, but widely supported, legacy
xterm/Konsole format for setting "direct colors" with set setaf and
setbf escape codes, which use semicolons as separators.

The documentation for xterm-true-color mentions that, as an alternative,
users can set alternative sequences that use colons instead of
semicolons. This format, though, isn't standard and it is unclear how
widely supported it is; it was added by xterm patch 282 due to a
misinterpretation of the ISO 8613-6 (ITU T.416) standard, and was later
changed to the format suggested by this patch, which is the one
specified in the standard.

Today, looking at ncurses' [terminfo], it seems that all terminal
emulators use either the standard format (named "xterm+direct" in the
terminfo source) or the legacy format (named "xterm+indirect" in the
terminfo source).

Hence, I believe it makes sense to align the docs with reality.

If you're interested in the story of this escape sequence, I'd recommend
reading
<https://invisible-island.net/ncurses/ncurses.faq.html#xterm_16MegaColors>.

[terminfo]: https://invisible-island.net/ncurses/terminfo.ti.html

closes: #16350

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Andrea Pappacoda <andrea@pappacoda.it>
runtime/doc/term.txt