4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: Command line completion doesn't work after "%:h" and similar.
12 Solution: Expand these items before doing the completion.
13 Files: src/ex_getln.c, src/misc1.c, src/proto/misc1.pro
16 *** ../vim-7.2.312/src/ex_getln.c 2009-09-18 17:24:54.000000000 +0200
17 --- src/ex_getln.c 2009-12-02 16:40:06.000000000 +0100
22 flags = (flags | EW_DIR) & ~EW_FILE;
23 ! ret = expand_wildcards(1, &pat, num_file, file, flags);
30 flags = (flags | EW_DIR) & ~EW_FILE;
31 ! /* Expand wildcards, supporting %:h and the like. */
32 ! ret = expand_wildcards_eval(&pat, num_file, file, flags);
36 *** ../vim-7.2.312/src/misc1.c 2009-11-17 16:08:12.000000000 +0100
37 --- src/misc1.c 2009-12-02 17:06:49.000000000 +0100
44 + * Invoke expand_wildcards() for one pattern.
45 + * Expand items like "%:h" before the expansion.
46 + * Returns OK or FAIL.
49 + expand_wildcards_eval(pat, num_file, file, flags)
50 + char_u **pat; /* pointer to input pattern */
51 + int *num_file; /* resulting number of files */
52 + char_u ***file; /* array of resulting files */
53 + int flags; /* EW_DIR, etc. */
56 + char_u *eval_pat = NULL;
57 + char_u *exp_pat = *pat;
58 + char_u *ignored_msg;
61 + if (*exp_pat == '%' || *exp_pat == '#' || *exp_pat == '<')
64 + eval_pat = eval_vars(exp_pat, exp_pat, &usedlen,
65 + NULL, &ignored_msg, NULL);
67 + if (eval_pat != NULL)
68 + exp_pat = concat_str(eval_pat, exp_pat + usedlen);
71 + if (exp_pat != NULL)
72 + ret = expand_wildcards(1, &exp_pat, num_file, file, flags);
74 + if (eval_pat != NULL)
84 * Expand wildcards. Calls gen_expand_wildcards() and removes files matching
87 *** ../vim-7.2.312/src/proto/misc1.pro 2007-09-26 22:36:32.000000000 +0200
88 --- src/proto/misc1.pro 2009-12-02 16:41:52.000000000 +0100
92 int vim_fexists __ARGS((char_u *fname));
93 void line_breakcheck __ARGS((void));
94 void fast_breakcheck __ARGS((void));
95 + int expand_wildcards_eval __ARGS((char_u **pat, int *num_file, char_u ***file, int flags));
96 int expand_wildcards __ARGS((int num_pat, char_u **pat, int *num_file, char_u ***file, int flags));
97 int match_suffix __ARGS((char_u *fname));
98 int unix_expandpath __ARGS((garray_T *gap, char_u *path, int wildoff, int flags, int didstar));
99 *** ../vim-7.2.312/src/version.c 2009-12-02 15:03:24.000000000 +0100
100 --- src/version.c 2009-12-02 17:14:02.000000000 +0100
104 { /* Add new patch number below this line */
110 hundred-and-one symptoms of being an internet addict:
111 8. You spend half of the plane trip with your laptop on your lap...and your
112 child in the overhead compartment.
114 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
115 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
116 \\\ download, build and distribute -- http://www.A-A-P.org ///
117 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///