]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.1.1054: Vim doesn't work well with TERM=xterm-direct v9.1.1054
authorChristian Brabandt <cb@256bit.org>
Sun, 26 Jan 2025 09:49:59 +0000 (10:49 +0100)
committerChristian Brabandt <cb@256bit.org>
Sun, 26 Jan 2025 09:53:17 +0000 (10:53 +0100)
commit279dd703e16cfa9e5089fb5e7c60b21a0a7debc3
treee7c1ddebd5b48d3bb607737e5b12339e639b3a23
parentfb49e3cde79de4ce558c86d21a56eb9d60aeabd5
patch 9.1.1054: Vim doesn't work well with TERM=xterm-direct

Problem:  Vim doesn't work well with TERM=xterm-direct
          (Andrea Pappacoda)
Solution: detect if a terminal supports true-colors and
          enable termguicolors

The terminfo database for xterm-direct contains both the (non-standard)
termcap RGB capability and a number of colors == 0x1000000 so it seems
either of those two options can be used to detect a terminal capable of
displaying true colors.

So set the termguicolor option automatically, when either of the two
options is detected. (for some reasons, my debian xterm (v393) does not
respond to XTGETTCAP query attempts, so falling back to the number of
colors seems like a good compromize)

fixes: #16327
closes: #16490

Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/doc/options.txt
runtime/doc/version9.txt
src/term.c
src/testdir/test_termcodes.vim
src/version.c