home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 6.0.245 < prev    next >
Encoding:
Internet Message Format  |  2002-02-20  |  2.1 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.0.245
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=ISO-8859-1
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 6.0.245
  11. Problem:    After using a color scheme, setting the 'background' option might
  12.         not work. (Peter Horst)
  13. Solution:   Disable the color scheme if it switches 'background' back to the
  14.         wrong value.
  15. Files:        src/option.c
  16.  
  17.  
  18. *** ../vim60.244/src/option.c    Wed Feb 20 22:07:15 2002
  19. --- src/option.c    Thu Feb 21 15:41:33 2002
  20. ***************
  21. *** 4421,4427 ****
  22. --- 4421,4448 ----
  23.       else if (varp == &p_bg)
  24.       {
  25.       if (check_opt_strings(p_bg, p_bg_values, FALSE) == OK)
  26. +     {
  27. + #ifdef FEAT_EVAL
  28. +         int dark = (*p_bg == 'd');
  29. + #endif
  30.           init_highlight(FALSE, FALSE);
  31. + #ifdef FEAT_EVAL
  32. +         if (dark != (*p_bg == 'd')
  33. +               && get_var_value((char_u *)"g:colors_name") != NULL)
  34. +         {
  35. +         /* The color scheme must have set 'background' back to another
  36. +          * value, that's not what we want here.  Disable the color
  37. +          * scheme and set the colors again. */
  38. +         do_unlet((char_u *)"g:colors_name");
  39. +         free_string_option(p_bg);
  40. +         p_bg = vim_strsave((char_u *)(dark ? "dark" : "light"));
  41. +         check_string_option(&p_bg);
  42. +         init_highlight(FALSE, FALSE);
  43. +         }
  44. + #endif
  45. +     }
  46.       else
  47.           errmsg = e_invarg;
  48.       }
  49. *** ../vim60.244/src/version.c    Thu Feb 21 13:59:30 2002
  50. --- src/version.c    Thu Feb 21 15:43:38 2002
  51. ***************
  52. *** 608,609 ****
  53. --- 608,611 ----
  54.   {   /* Add new patch number below this line */
  55. + /**/
  56. +     245,
  57.   /**/
  58.  
  59. -- 
  60. If your company is not involved in something called "ISO 9000" you probably
  61. have no idea what it is.  If your company _is_ involved in ISO 9000 then you
  62. definitely have no idea what it is.
  63.                 (Scott Adams - The Dilbert principle)
  64.  
  65.  ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
  66. ///   Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim   \\\
  67. \\\           Project leader for A-A-P -- http://www.a-a-p.org           ///
  68.  \\\  Help me helping AIDS orphans in Uganda - http://iccf-holland.org  ///
  69.