]> git.pld-linux.org Git - packages/vim.git/blame - 7.3.237
- new
[packages/vim.git] / 7.3.237
CommitLineData
a2e11672
AG
1To: vim_dev@googlegroups.com
2Subject: Patch 7.3.237
3Fcc: outbox
4From: Bram Moolenaar <Bram@moolenaar.net>
5Mime-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8------------
9
10Patch 7.3.237
11Problem: "filetype" completion doesn't work on Windows. (Yue Wu)
12Solution: Don't use a glob pattern for the directories, use a list of
13 directories. (Dominique Pelle)
14Files: src/ex_getln.c
15
16
17*** ../vim-7.3.236/src/ex_getln.c 2011-05-19 18:26:34.000000000 +0200
18--- src/ex_getln.c 2011-06-26 19:36:36.000000000 +0200
19***************
20*** 110,116 ****
21 static int expand_showtail __ARGS((expand_T *xp));
22 #ifdef FEAT_CMDL_COMPL
23 static int expand_shellcmd __ARGS((char_u *filepat, int *num_file, char_u ***file, int flagsarg));
24! static int ExpandRTDir __ARGS((char_u *pat, int *num_file, char_u ***file, char *dirname));
25 # if defined(FEAT_USR_CMDS) && defined(FEAT_EVAL)
26 static int ExpandUserDefined __ARGS((expand_T *xp, regmatch_T *regmatch, int *num_file, char_u ***file));
27 static int ExpandUserList __ARGS((expand_T *xp, int *num_file, char_u ***file));
28--- 110,116 ----
29 static int expand_showtail __ARGS((expand_T *xp));
30 #ifdef FEAT_CMDL_COMPL
31 static int expand_shellcmd __ARGS((char_u *filepat, int *num_file, char_u ***file, int flagsarg));
32! static int ExpandRTDir __ARGS((char_u *pat, int *num_file, char_u ***file, char *dirname[]));
33 # if defined(FEAT_USR_CMDS) && defined(FEAT_EVAL)
34 static int ExpandUserDefined __ARGS((expand_T *xp, regmatch_T *regmatch, int *num_file, char_u ***file));
35 static int ExpandUserList __ARGS((expand_T *xp, int *num_file, char_u ***file));
36***************
37*** 4536,4548 ****
38 || xp->xp_context == EXPAND_TAGS_LISTFILES)
39 return expand_tags(xp->xp_context == EXPAND_TAGS, pat, num_file, file);
40 if (xp->xp_context == EXPAND_COLORS)
41! return ExpandRTDir(pat, num_file, file, "colors");
42 if (xp->xp_context == EXPAND_COMPILER)
43! return ExpandRTDir(pat, num_file, file, "compiler");
44 if (xp->xp_context == EXPAND_OWNSYNTAX)
45! return ExpandRTDir(pat, num_file, file, "syntax");
46 if (xp->xp_context == EXPAND_FILETYPE)
47! return ExpandRTDir(pat, num_file, file, "{syntax,indent,ftplugin}");
48 # if defined(FEAT_USR_CMDS) && defined(FEAT_EVAL)
49 if (xp->xp_context == EXPAND_USER_LIST)
50 return ExpandUserList(xp, num_file, file);
51--- 4536,4560 ----
52 || xp->xp_context == EXPAND_TAGS_LISTFILES)
53 return expand_tags(xp->xp_context == EXPAND_TAGS, pat, num_file, file);
54 if (xp->xp_context == EXPAND_COLORS)
55! {
56! char *directories[] = {"colors", NULL};
57! return ExpandRTDir(pat, num_file, file, directories);
58! }
59 if (xp->xp_context == EXPAND_COMPILER)
60! {
61! char *directories[] = {"colors", NULL};
62! return ExpandRTDir(pat, num_file, file, directories);
63! }
64 if (xp->xp_context == EXPAND_OWNSYNTAX)
65! {
66! char *directories[] = {"syntax", NULL};
67! return ExpandRTDir(pat, num_file, file, directories);
68! }
69 if (xp->xp_context == EXPAND_FILETYPE)
70! {
71! char *directories[] = {"syntax", "indent", "ftplugin", NULL};
72! return ExpandRTDir(pat, num_file, file, directories);
73! }
74 # if defined(FEAT_USR_CMDS) && defined(FEAT_EVAL)
75 if (xp->xp_context == EXPAND_USER_LIST)
76 return ExpandUserList(xp, num_file, file);
77***************
78*** 4995,5051 ****
79 /*
80 * Expand color scheme, compiler or filetype names:
81 * 'runtimepath'/{dirnames}/{pat}.vim
82! * dirnames may contain one directory (ex: "colorscheme") or can be a glob
83! * expression matching multiple directories (ex: "{syntax,ftplugin,indent}").
84 */
85 static int
86 ExpandRTDir(pat, num_file, file, dirnames)
87 char_u *pat;
88 int *num_file;
89 char_u ***file;
90! char *dirnames;
91 {
92! char_u *all;
93 char_u *s;
94 char_u *e;
95 garray_T ga;
96
97 *num_file = 0;
98 *file = NULL;
99! s = alloc((unsigned)(STRLEN(pat) + STRLEN(dirnames) + 7));
100! if (s == NULL)
101! return FAIL;
102! sprintf((char *)s, "%s/%s*.vim", dirnames, pat);
103! all = globpath(p_rtp, s, 0);
104! vim_free(s);
105! if (all == NULL)
106! return FAIL;
107
108! ga_init2(&ga, (int)sizeof(char *), 3);
109! for (s = all; *s != NUL; s = e)
110 {
111! e = vim_strchr(s, '\n');
112! if (e == NULL)
113! e = s + STRLEN(s);
114! if (ga_grow(&ga, 1) == FAIL)
115! break;
116! if (e - 4 > s && STRNICMP(e - 4, ".vim", 4) == 0)
117 {
118! for (s = e - 4; s > all; mb_ptr_back(all, s))
119! if (*s == '\n' || vim_ispathsep(*s))
120! break;
121! ++s;
122! ((char_u **)ga.ga_data)[ga.ga_len] =
123 vim_strnsave(s, (int)(e - s - 4));
124! ++ga.ga_len;
125 }
126! if (*e != NUL)
127! ++e;
128 }
129! vim_free(all);
130
131 /* Sort and remove duplicates which can happen when specifying multiple
132! * directories in dirnames such as "{syntax,ftplugin,indent}". */
133 remove_duplicates(&ga);
134
135 *file = ga.ga_data;
136--- 5007,5074 ----
137 /*
138 * Expand color scheme, compiler or filetype names:
139 * 'runtimepath'/{dirnames}/{pat}.vim
140! * "dirnames" is an array with one or more directory names.
141 */
142 static int
143 ExpandRTDir(pat, num_file, file, dirnames)
144 char_u *pat;
145 int *num_file;
146 char_u ***file;
147! char *dirnames[];
148 {
149! char_u *matches;
150 char_u *s;
151 char_u *e;
152 garray_T ga;
153+ int i;
154+ int pat_len;
155
156 *num_file = 0;
157 *file = NULL;
158! pat_len = STRLEN(pat);
159! ga_init2(&ga, (int)sizeof(char *), 10);
160
161! for (i = 0; dirnames[i] != NULL; ++i)
162 {
163! s = alloc((unsigned)(STRLEN(dirnames[i]) + pat_len + 7));
164! if (s == NULL)
165 {
166! ga_clear_strings(&ga);
167! return FAIL;
168! }
169! sprintf((char *)s, "%s/%s*.vim", dirnames[i], pat);
170! matches = globpath(p_rtp, s, 0);
171! vim_free(s);
172! if (matches == NULL)
173! continue;
174!
175! for (s = matches; *s != NUL; s = e)
176! {
177! e = vim_strchr(s, '\n');
178! if (e == NULL)
179! e = s + STRLEN(s);
180! if (ga_grow(&ga, 1) == FAIL)
181! break;
182! if (e - 4 > s && STRNICMP(e - 4, ".vim", 4) == 0)
183! {
184! for (s = e - 4; s > matches; mb_ptr_back(matches, s))
185! if (*s == '\n' || vim_ispathsep(*s))
186! break;
187! ++s;
188! ((char_u **)ga.ga_data)[ga.ga_len] =
189 vim_strnsave(s, (int)(e - s - 4));
190! ++ga.ga_len;
191! }
192! if (*e != NUL)
193! ++e;
194 }
195! vim_free(matches);
196 }
197! if (ga.ga_len == 0)
198! return FAIL;
199
200 /* Sort and remove duplicates which can happen when specifying multiple
201! * directories in dirnames. */
202 remove_duplicates(&ga);
203
204 *file = ga.ga_data;
205*** ../vim-7.3.236/src/version.c 2011-06-26 19:13:33.000000000 +0200
206--- src/version.c 2011-06-26 19:39:39.000000000 +0200
207***************
208*** 711,712 ****
209--- 711,714 ----
210 { /* Add new patch number below this line */
211+ /**/
212+ 237,
213 /**/
214
215--
216hundred-and-one symptoms of being an internet addict:
217230. You spend your Friday nights typing away at your keyboard
218
219 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
220/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
221\\\ an exciting new programming language -- http://www.Zimbu.org ///
222 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
This page took 0.09851 seconds and 4 git commands to generate.