Patch 8.2.0518
Problem: A terminal falls back to setting $TERM to "xterm".
Solution: Use "xterm-color" if more than 16 colors are supported and
"xterm-256color" if at least 256 colors are supported.
(closes #5887)
Files: src/os_unix.c
*** ../vim-8.2.0517/src/os_unix.c 2020-02-26 16:15:31.072386953 +0100
--- src/os_unix.c 2020-04-05 21:40:16.385461280 +0200
***************
*** 5493,5499 ****
// Use 'term' or $TERM if it starts with "xterm", otherwise fall
// back to "xterm".
if (term == NULL || *term == NUL || STRNCMP(term, "xterm", 5) != 0)
! term = "xterm";
set_child_environment(
(long)options->jo_term_rows,
(long)options->jo_term_cols,
--- 5493,5506 ----
// Use 'term' or $TERM if it starts with "xterm", otherwise fall
// back to "xterm".
if (term == NULL || *term == NUL || STRNCMP(term, "xterm", 5) != 0)
! {
! if (t_colors > 16)
! term = "xterm-color";
! if (t_colors >= 256)
! term = "xterm-256color";
! else
! term = "xterm";
! }
set_child_environment(
(long)options->jo_term_rows,
(long)options->jo_term_cols,
*** ../vim-8.2.0517/src/version.c 2020-04-05 21:38:11.637962358 +0200
--- src/version.c 2020-04-05 21:41:27.637174642 +0200
***************
*** 740,741 ****
--- 740,743 ----
{ /* Add new patch number below this line */
+ /**/
+ 518,
/**/
--
Any sufficiently advanced technology is indistinguishable from magic.
Arthur C. Clarke
Any sufficiently advanced bug is indistinguishable from a feature.
Rich Kulawiec
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language --
http://www.Zimbu.org ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///