Problem: The GUI doesn't set t_Co.
Solution: In the GUI set t_Co to 256 * 256 * 256. (closes #5903)
*/
set_option_value((char_u *)"paste", 0L, NULL, 0);
+ // Set t_Co to the number of colors: RGB.
+ set_color_count(256 * 256 * 256);
+
/*
* Set up system-wide default menus.
*/
/* term.c */
guicolor_T termgui_get_color(char_u *name);
guicolor_T termgui_mch_get_rgb(guicolor_T color);
+void set_color_count(int nr);
int set_termname(char_u *term);
void getlinecol(long *cp, long *rp);
int add_termcap_entry(char_u *name, int force);
* Store it as a number in t_colors.
* Store it as a string in T_CCO (using nr_colors[]).
*/
- static void
+ void
set_color_count(int nr)
{
char_u nr_colors[20]; // string for number of colors
endfunc
func Test_colorscheme()
+ call assert_equal('16777216', &t_Co)
+
let colorscheme_saved = exists('g:colors_name') ? g:colors_name : 'default'
let g:color_count = 0
augroup TestColors
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 554,
/**/
553,
/**/