Patch 8.2.0554
Problem:    The GUI doesn't set t_Co.
Solution:   In the GUI set t_Co to 256 * 256 * 256. (closes #5903)
Files:      src/term.c, src/proto/term.pro, src/gui.c,
            src/testdir/test_gui.vim


*** ../vim-8.2.0553/src/term.c  2020-02-26 16:15:31.076386941 +0100
--- src/term.c  2020-04-12 15:06:27.622973722 +0200
***************
*** 1552,1558 ****
   * Store it as a number in t_colors.
   * Store it as a string in T_CCO (using nr_colors[]).
   */
!     static void
  set_color_count(int nr)
  {
      char_u    nr_colors[20];          // string for number of colors
--- 1552,1558 ----
   * Store it as a number in t_colors.
   * Store it as a string in T_CCO (using nr_colors[]).
   */
!     void
  set_color_count(int nr)
  {
      char_u    nr_colors[20];          // string for number of colors
*** ../vim-8.2.0553/src/proto/term.pro  2020-02-15 23:06:40.822770278 +0100
--- src/proto/term.pro  2020-04-12 15:06:41.030938254 +0200
***************
*** 1,6 ****
--- 1,7 ----
  /* 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);
*** ../vim-8.2.0553/src/gui.c   2020-04-02 18:50:42.423773112 +0200
--- src/gui.c   2020-04-12 15:05:34.767113406 +0200
***************
*** 513,518 ****
--- 513,521 ----
         */
        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.
         */
*** ../vim-8.2.0553/src/testdir/test_gui.vim    2020-04-06 21:35:02.464237765 
+0200
--- src/testdir/test_gui.vim    2020-04-12 15:08:29.102651810 +0200
***************
*** 31,36 ****
--- 31,38 ----
  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
*** ../vim-8.2.0553/src/version.c       2020-04-12 14:50:22.317438970 +0200
--- src/version.c       2020-04-12 15:09:37.578469853 +0200
***************
*** 740,741 ****
--- 740,743 ----
  {   /* Add new patch number below this line */
+ /**/
+     554,
  /**/

-- 
Wi n0t trei a h0liday in Sweden thi yer?
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [email protected] -- 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    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202004121311.03CDBWko016463%40masaka.moolenaar.net.

Raspunde prin e-mail lui