static char envbuf_Servername[60];
# endif
# endif
- long colors =
-# ifdef FEAT_GUI
- gui.in_use ? 256*256*256 :
-# endif
- t_colors;
# ifdef HAVE_SETENV
setenv("TERM", term, 1);
setenv("LINES", (char *)envbuf, 1);
sprintf((char *)envbuf, "%ld", columns);
setenv("COLUMNS", (char *)envbuf, 1);
- sprintf((char *)envbuf, "%ld", colors);
+ sprintf((char *)envbuf, "%d", t_colors);
setenv("COLORS", (char *)envbuf, 1);
# ifdef FEAT_TERMINAL
if (is_terminal)
}
need_gather = TRUE;
- // Set t_colors to the value of $COLORS or t_Co.
+ // Set t_colors to the value of $COLORS or t_Co. Ignore $COLORS in the
+ // GUI.
t_colors = atoi((char *)T_CCO);
- env_colors = mch_getenv((char_u *)"COLORS");
- if (env_colors != NULL && isdigit(*env_colors))
+#ifdef FEAT_GUI
+ if (!gui.in_use)
+#endif
{
- int colors = atoi((char *)env_colors);
+ env_colors = mch_getenv((char_u *)"COLORS");
+ if (env_colors != NULL && isdigit(*env_colors))
+ {
+ int colors = atoi((char *)env_colors);
- if (colors != t_colors)
- set_color_count(colors);
+ if (colors != t_colors)
+ set_color_count(colors);
+ }
}
}
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 646,
/**/
645,
/**/