]>
Commit | Line | Data |
---|---|---|
48112765 AG |
1 | To: vim-dev@vim.org |
2 | Subject: Patch 6.2.379 | |
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.2.379 | |
11 | Problem: Using ":mkvimrc" in the ":options" window sets 'bufhidden' to | |
12 | "delete". (Michael Naumann) | |
13 | Solution: Do not add buffer-specific option values to a global vimrc file. | |
14 | Files: src/option.c | |
15 | ||
16 | ||
17 | *** ../vim-6.2.378/src/option.c Thu Mar 11 21:08:44 2004 | |
18 | --- src/option.c Thu Mar 18 15:19:32 2004 | |
19 | *************** | |
20 | *** 292,297 **** | |
21 | --- 292,298 ---- | |
22 | ||
23 | #define P_SECURE 0x40000L/* cannot change in modeline or secure mode */ | |
24 | #define P_GETTEXT 0x80000L/* expand default value with _() */ | |
25 | + #define P_NOGLOB 0x100000L/* do not use local value for global vimrc */ | |
26 | ||
27 | /* | |
28 | * options[] is initialized here. | |
29 | *************** | |
30 | *** 479,485 **** | |
31 | {(char_u *)0L, (char_u *)0L} | |
32 | #endif | |
33 | }, | |
34 | ! {"bufhidden", "bh", P_STRING|P_ALLOCED|P_VI_DEF, | |
35 | #if defined(FEAT_QUICKFIX) | |
36 | (char_u *)&p_bh, PV_BH, | |
37 | {(char_u *)"", (char_u *)0L} | |
38 | --- 480,486 ---- | |
39 | {(char_u *)0L, (char_u *)0L} | |
40 | #endif | |
41 | }, | |
42 | ! {"bufhidden", "bh", P_STRING|P_ALLOCED|P_VI_DEF|P_NOGLOB, | |
43 | #if defined(FEAT_QUICKFIX) | |
44 | (char_u *)&p_bh, PV_BH, | |
45 | {(char_u *)"", (char_u *)0L} | |
46 | *************** | |
47 | *** 488,498 **** | |
48 | {(char_u *)0L, (char_u *)0L} | |
49 | #endif | |
50 | }, | |
51 | ! {"buflisted", "bl", P_BOOL|P_VI_DEF, | |
52 | (char_u *)&p_bl, PV_BL, | |
53 | {(char_u *)1L, (char_u *)0L} | |
54 | }, | |
55 | ! {"buftype", "bt", P_STRING|P_ALLOCED|P_VI_DEF, | |
56 | #if defined(FEAT_QUICKFIX) | |
57 | (char_u *)&p_bt, PV_BT, | |
58 | {(char_u *)"", (char_u *)0L} | |
59 | --- 489,499 ---- | |
60 | {(char_u *)0L, (char_u *)0L} | |
61 | #endif | |
62 | }, | |
63 | ! {"buflisted", "bl", P_BOOL|P_VI_DEF|P_NOGLOB, | |
64 | (char_u *)&p_bl, PV_BL, | |
65 | {(char_u *)1L, (char_u *)0L} | |
66 | }, | |
67 | ! {"buftype", "bt", P_STRING|P_ALLOCED|P_VI_DEF|P_NOGLOB, | |
68 | #if defined(FEAT_QUICKFIX) | |
69 | (char_u *)&p_bt, PV_BT, | |
70 | {(char_u *)"", (char_u *)0L} | |
71 | *************** | |
72 | *** 716,722 **** | |
73 | (char_u *)NULL, PV_NONE, | |
74 | #endif | |
75 | {(char_u *)"", (char_u *)0L}}, | |
76 | ! {"diff", NULL, P_BOOL|P_VI_DEF|P_RWIN, | |
77 | #ifdef FEAT_DIFF | |
78 | (char_u *)VAR_WIN, PV_DIFF, | |
79 | #else | |
80 | --- 717,723 ---- | |
81 | (char_u *)NULL, PV_NONE, | |
82 | #endif | |
83 | {(char_u *)"", (char_u *)0L}}, | |
84 | ! {"diff", NULL, P_BOOL|P_VI_DEF|P_RWIN|P_NOGLOB, | |
85 | #ifdef FEAT_DIFF | |
86 | (char_u *)VAR_WIN, PV_DIFF, | |
87 | #else | |
88 | *************** | |
89 | *** 845,851 **** | |
90 | {"fileformats", "ffs", P_STRING|P_VIM|P_COMMA|P_NODUP, | |
91 | (char_u *)&p_ffs, PV_NONE, | |
92 | {(char_u *)DFLT_FFS_VI, (char_u *)DFLT_FFS_VIM}}, | |
93 | ! {"filetype", "ft", P_STRING|P_ALLOCED|P_VI_DEF, | |
94 | #ifdef FEAT_AUTOCMD | |
95 | (char_u *)&p_ft, PV_FT, | |
96 | {(char_u *)"", (char_u *)0L} | |
97 | --- 846,852 ---- | |
98 | {"fileformats", "ffs", P_STRING|P_VIM|P_COMMA|P_NODUP, | |
99 | (char_u *)&p_ffs, PV_NONE, | |
100 | {(char_u *)DFLT_FFS_VI, (char_u *)DFLT_FFS_VIM}}, | |
101 | ! {"filetype", "ft", P_STRING|P_ALLOCED|P_VI_DEF|P_NOGLOB, | |
102 | #ifdef FEAT_AUTOCMD | |
103 | (char_u *)&p_ft, PV_FT, | |
104 | {(char_u *)"", (char_u *)0L} | |
105 | *************** | |
106 | *** 1462,1468 **** | |
107 | {"modelines", "mls", P_NUM|P_VI_DEF, | |
108 | (char_u *)&p_mls, PV_NONE, | |
109 | {(char_u *)5L, (char_u *)0L}}, | |
110 | ! {"modifiable", "ma", P_BOOL|P_VI_DEF, | |
111 | (char_u *)&p_ma, PV_MA, | |
112 | {(char_u *)TRUE, (char_u *)0L}}, | |
113 | {"modified", "mod", P_BOOL|P_NO_MKRC|P_VI_DEF|P_RSTAT, | |
114 | --- 1475,1481 ---- | |
115 | {"modelines", "mls", P_NUM|P_VI_DEF, | |
116 | (char_u *)&p_mls, PV_NONE, | |
117 | {(char_u *)5L, (char_u *)0L}}, | |
118 | ! {"modifiable", "ma", P_BOOL|P_VI_DEF|P_NOGLOB, | |
119 | (char_u *)&p_ma, PV_MA, | |
120 | {(char_u *)TRUE, (char_u *)0L}}, | |
121 | {"modified", "mod", P_BOOL|P_NO_MKRC|P_VI_DEF|P_RSTAT, | |
122 | *************** | |
123 | *** 1587,1593 **** | |
124 | (char_u *)NULL, PV_NONE, | |
125 | #endif | |
126 | {(char_u *)12L, (char_u *)0L}}, | |
127 | ! {"previewwindow", "pvw", P_BOOL|P_VI_DEF|P_RSTAT, | |
128 | #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) | |
129 | (char_u *)VAR_WIN, PV_PVW, | |
130 | #else | |
131 | --- 1600,1606 ---- | |
132 | (char_u *)NULL, PV_NONE, | |
133 | #endif | |
134 | {(char_u *)12L, (char_u *)0L}}, | |
135 | ! {"previewwindow", "pvw", P_BOOL|P_VI_DEF|P_RSTAT|P_NOGLOB, | |
136 | #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) | |
137 | (char_u *)VAR_WIN, PV_PVW, | |
138 | #else | |
139 | *************** | |
140 | *** 1657,1663 **** | |
141 | {"prompt", NULL, P_BOOL|P_VI_DEF, | |
142 | (char_u *)NULL, PV_NONE, | |
143 | {(char_u *)FALSE, (char_u *)0L}}, | |
144 | ! {"readonly", "ro", P_BOOL|P_VI_DEF|P_RSTAT, | |
145 | (char_u *)&p_ro, PV_RO, | |
146 | {(char_u *)FALSE, (char_u *)0L}}, | |
147 | {"redraw", NULL, P_BOOL|P_VI_DEF, | |
148 | --- 1670,1676 ---- | |
149 | {"prompt", NULL, P_BOOL|P_VI_DEF, | |
150 | (char_u *)NULL, PV_NONE, | |
151 | {(char_u *)FALSE, (char_u *)0L}}, | |
152 | ! {"readonly", "ro", P_BOOL|P_VI_DEF|P_RSTAT|P_NOGLOB, | |
153 | (char_u *)&p_ro, PV_RO, | |
154 | {(char_u *)FALSE, (char_u *)0L}}, | |
155 | {"redraw", NULL, P_BOOL|P_VI_DEF, | |
156 | *************** | |
157 | *** 1980,1986 **** | |
158 | {"switchbuf", "swb", P_STRING|P_VI_DEF|P_COMMA|P_NODUP, | |
159 | (char_u *)&p_swb, PV_NONE, | |
160 | {(char_u *)"", (char_u *)0L}}, | |
161 | ! {"syntax", "syn", P_STRING|P_ALLOCED|P_VI_DEF, | |
162 | #ifdef FEAT_SYN_HL | |
163 | (char_u *)&p_syn, PV_SYN, | |
164 | {(char_u *)"", (char_u *)0L} | |
165 | --- 1993,1999 ---- | |
166 | {"switchbuf", "swb", P_STRING|P_VI_DEF|P_COMMA|P_NODUP, | |
167 | (char_u *)&p_swb, PV_NONE, | |
168 | {(char_u *)"", (char_u *)0L}}, | |
169 | ! {"syntax", "syn", P_STRING|P_ALLOCED|P_VI_DEF|P_NOGLOB, | |
170 | #ifdef FEAT_SYN_HL | |
171 | (char_u *)&p_syn, PV_SYN, | |
172 | {(char_u *)"", (char_u *)0L} | |
173 | *************** | |
174 | *** 7351,7356 **** | |
175 | --- 7364,7374 ---- | |
176 | { | |
177 | /* skip global option when only doing locals */ | |
178 | if (p->indir == PV_NONE && !(opt_flags & OPT_GLOBAL)) | |
179 | + continue; | |
180 | + | |
181 | + /* Do not store options like 'bufhidden' and 'syntax' in a vimrc | |
182 | + * file, they are always buffer-specific. */ | |
183 | + if ((opt_flags & OPT_GLOBAL) && (p->flags & P_NOGLOB)) | |
184 | continue; | |
185 | ||
186 | /* Global values are only written when not at the default value. */ | |
187 | *** ../vim-6.2.378/src/version.c Thu Mar 18 14:39:31 2004 | |
188 | --- src/version.c Thu Mar 18 15:21:12 2004 | |
189 | *************** | |
190 | *** 639,640 **** | |
191 | --- 639,642 ---- | |
192 | { /* Add new patch number below this line */ | |
193 | + /**/ | |
194 | + 379, | |
195 | /**/ | |
196 | ||
197 | -- | |
198 | hundred-and-one symptoms of being an internet addict: | |
199 | 59. Your wife says communication is important in a marriage...so you buy | |
200 | another computer and install a second phone line so the two of you can | |
201 | chat. | |
202 | ||
203 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
204 | /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ | |
205 | \\\ Project leader for A-A-P -- http://www.A-A-P.org /// | |
206 | \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html /// |