OSDN Git Service

vim-app fix transp and vimrc,gvimrc
[splhack/MacPorts.git] / editors / vim-app / files / patch-option-cocoa.c
1 --- src/option.c.orig
2 +++ src/option.c
3 @@ -2557,13 +2557,13 @@
4                             (char_u *)&p_tbis, PV_NONE,
5                             {(char_u *)"small", (char_u *)0L}},
6  #endif
7 -    {"transparency",   "transp",  P_NUM|P_VIM|P_RCLR,
8 +    {"transparency",   "transp",  P_NUM|P_VI_DEF,
9  #if defined(FEAT_GUI_COCOA)
10                              (char_u *)&p_transp, PV_NONE,
11  #else
12                              (char_u *)NULL, PV_NONE,
13  #endif
14 -                            {(char_u *)0L, (char_u *)0L} },
15 +                            {(char_u *)255L, (char_u *)0L} },
16      {"ttimeout",    NULL,   P_BOOL|P_VI_DEF|P_VIM,
17                             (char_u *)&p_ttimeout, PV_NONE,
18                             {(char_u *)FALSE, (char_u *)0L}},
19 @@ -8004,15 +8004,14 @@
20  #endif
21  
22  #if defined(FEAT_GUI_COCOA)
23 -     /* 'transparency' is a number between 0 and 100 */
24 +     /* 'transparency' is a number between 1 and 255 */
25      else if (pp == &p_transp)
26      {
27 -        if (p_transp < 0 || p_transp > 100)
28 +        if (p_transp < 1 || p_transp > 255)
29          {
30 -            errmsg = e_invarg;
31 -            p_transp = old_value;
32 +            p_transp = 255;
33          }
34 -        else if (gui.in_use)
35 +        if (gui.in_use)
36              gui_mch_new_colors();
37      }
38  #endif