Patch 7.2.418
Problem:    Vim tries to set the background or foreground color in a terminal
            to -1.  (Graywh)  Happens with ":hi Normal ctermbg=NONE".
Solution:   When resetting the foreground or background color don't set the
            color, let the clear screen code do that.
Files:      src/syntax.c


*** ../vim-7.2.417/src/syntax.c 2010-03-23 14:39:07.000000000 +0100
--- src/syntax.c        2010-05-13 15:34:27.000000000 +0200
***************
*** 7136,7142 ****
                    }
                }
            }
!           /* Add one to the argument, to avoid zero */
            if (key[5] == 'F')
            {
                HL_TABLE()[idx].sg_cterm_fg = color + 1;
--- 7136,7143 ----
                    }
                }
            }
!           /* Add one to the argument, to avoid zero.  Zero is used for
!            * "NONE", then "color" is -1. */
            if (key[5] == 'F')
            {
                HL_TABLE()[idx].sg_cterm_fg = color + 1;
***************
*** 7150,7156 ****
  #endif
                    {
                        must_redraw = CLEAR;
!                       if (termcap_active)
                            term_fg_color(color);
                    }
                }
--- 7151,7157 ----
  #endif
                    {
                        must_redraw = CLEAR;
!                       if (termcap_active && color >= 0)
                            term_fg_color(color);
                    }
                }
***************
*** 7167,7182 ****
  #endif
                    {
                        must_redraw = CLEAR;
!                       if (termcap_active)
!                           term_bg_color(color);
!                       if (t_colors < 16)
!                           i = (color == 0 || color == 4);
!                       else
!                           i = (color < 7 || color == 8);
!                       /* Set the 'background' option if the value is wrong. */
!                       if (i != (*p_bg == 'd'))
!                           set_option_value((char_u *)"bg", 0L,
!                                i ? (char_u *)"dark" : (char_u *)"light", 0);
                    }
                }
            }
--- 7168,7188 ----
  #endif
                    {
                        must_redraw = CLEAR;
!                       if (color >= 0)
!                       {
!                           if (termcap_active)
!                               term_bg_color(color);
!                           if (t_colors < 16)
!                               i = (color == 0 || color == 4);
!                           else
!                               i = (color < 7 || color == 8);
!                           /* Set the 'background' option if the value is
!                            * wrong. */
!                           if (i != (*p_bg == 'd'))
!                               set_option_value((char_u *)"bg", 0L,
!                                       i ?  (char_u *)"dark"
!                                         : (char_u *)"light", 0);
!                       }
                    }
                }
            }
*** ../vim-7.2.417/src/version.c        2010-05-13 13:12:01.000000000 +0200
--- src/version.c       2010-05-13 14:29:59.000000000 +0200
***************
*** 683,684 ****
--- 683,686 ----
  {   /* Add new patch number below this line */
+ /**/
+     418,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
30. Even though you died last week, you've managed to retain OPS on your
    favorite IRC channel.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.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

Raspunde prin e-mail lui