comparison src/term.c @ 20181:0ab9d7469ce7 v8.2.0646

patch 8.2.0646: t_Co uses the value of $COLORS in the GUI Commit: https://github.com/vim/vim/commit/759d81549c1340185f0d92524c563bb37697ea88 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Apr 26 16:52:49 2020 +0200 patch 8.2.0646: t_Co uses the value of $COLORS in the GUI Problem: t_Co uses the value of $COLORS in the GUI. (Masato Nishihata) Solution: Ignore $COLORS for the GUI. (closes https://github.com/vim/vim/issues/5992)
author Bram Moolenaar <Bram@vim.org>
date Sun, 26 Apr 2020 17:00:03 +0200
parents fcfad3f4bc66
children 426ef48be465
comparison
equal deleted inserted replaced
20180:6ac0d289f8e7 20181:0ab9d7469ce7
3120 // Set 'weirdinvert' according to value of 't_xs' 3120 // Set 'weirdinvert' according to value of 't_xs'
3121 p_wiv = (*T_XS != NUL); 3121 p_wiv = (*T_XS != NUL);
3122 } 3122 }
3123 need_gather = TRUE; 3123 need_gather = TRUE;
3124 3124
3125 // Set t_colors to the value of $COLORS or t_Co. 3125 // Set t_colors to the value of $COLORS or t_Co. Ignore $COLORS in the
3126 // GUI.
3126 t_colors = atoi((char *)T_CCO); 3127 t_colors = atoi((char *)T_CCO);
3127 env_colors = mch_getenv((char_u *)"COLORS"); 3128 #ifdef FEAT_GUI
3128 if (env_colors != NULL && isdigit(*env_colors)) 3129 if (!gui.in_use)
3129 { 3130 #endif
3130 int colors = atoi((char *)env_colors); 3131 {
3131 3132 env_colors = mch_getenv((char_u *)"COLORS");
3132 if (colors != t_colors) 3133 if (env_colors != NULL && isdigit(*env_colors))
3133 set_color_count(colors); 3134 {
3135 int colors = atoi((char *)env_colors);
3136
3137 if (colors != t_colors)
3138 set_color_count(colors);
3139 }
3134 } 3140 }
3135 } 3141 }
3136 3142
3137 #if (defined(FEAT_GUI) && (defined(FEAT_MENU) || !defined(USE_ON_FLY_SCROLL))) \ 3143 #if (defined(FEAT_GUI) && (defined(FEAT_MENU) || !defined(USE_ON_FLY_SCROLL))) \
3138 || defined(PROTO) 3144 || defined(PROTO)