]> git.pld-linux.org Git - packages/vim.git/blob - 7.1.081
- updated to 7.1.285
[packages/vim.git] / 7.1.081
1 To: vim-dev@vim.org
2 Subject: patch 7.1.081
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 7.1.081
11 Problem:    Command line completion for a shell command: "cat </tmp/file<Tab>"
12             doesn't work.
13 Solution:   Start the file name at any character that can't be in a file name.
14             (Martin Toft)
15 Files:      src/ex_docmd.c
16
17
18 *** ../vim-7.1.080/src/ex_docmd.c       Tue Aug 14 22:54:00 2007
19 --- src/ex_docmd.c      Sat Aug 18 14:58:53 2007
20 ***************
21 *** 3281,3319 ****
22   
23       if (ea.argt & XFILE)
24       {
25 !       int in_quote = FALSE;
26 !       char_u *bow = NULL;     /* Beginning of word */
27   
28         /*
29          * Allow spaces within back-quotes to count as part of the argument
30          * being expanded.
31          */
32         xp->xp_pattern = skipwhite(arg);
33 !       for (p = xp->xp_pattern; *p; )
34         {
35 !           if (*p == '\\' && p[1] != NUL)
36                 ++p;
37   #ifdef SPACE_IN_FILENAME
38 !           else if (vim_iswhite(*p) && (!(ea.argt & NOSPC) || usefilter))
39   #else
40 !           else if (vim_iswhite(*p))
41   #endif
42             {
43 !               p = skipwhite(p);
44                 if (in_quote)
45                     bow = p;
46                 else
47                     xp->xp_pattern = p;
48 !               --p;
49 !           }
50 !           else if (*p == '`')
51 !           {
52 !               if (!in_quote)
53 !               {
54 !                   xp->xp_pattern = p;
55 !                   bow = p + 1;
56 !               }
57 !               in_quote = !in_quote;
58             }
59             mb_ptr_adv(p);
60         }
61 --- 3281,3344 ----
62   
63       if (ea.argt & XFILE)
64       {
65 !       int     c;
66 !       int     in_quote = FALSE;
67 !       char_u  *bow = NULL;    /* Beginning of word */
68   
69         /*
70          * Allow spaces within back-quotes to count as part of the argument
71          * being expanded.
72          */
73         xp->xp_pattern = skipwhite(arg);
74 !       p = xp->xp_pattern;
75 !       while (*p != NUL)
76         {
77 ! #ifdef FEAT_MBYTE
78 !           if (has_mbyte)
79 !               c = mb_ptr2char(p);
80 !           else
81 ! #endif
82 !               c = *p;
83 !           if (c == '\\' && p[1] != NUL)
84                 ++p;
85 +           else if (c == '`')
86 +           {
87 +               if (!in_quote)
88 +               {
89 +                   xp->xp_pattern = p;
90 +                   bow = p + 1;
91 +               }
92 +               in_quote = !in_quote;
93 +           }
94   #ifdef SPACE_IN_FILENAME
95 !           else if (!vim_isfilec(c) && (!(ea.argt & NOSPC) || usefilter))
96   #else
97 !           else if (!vim_isfilec(c))
98   #endif
99             {
100 !               while (*p != NUL)
101 !               {
102 ! #ifdef FEAT_MBYTE
103 !                   if (has_mbyte)
104 !                       c = mb_ptr2char(p);
105 !                   else
106 ! #endif
107 !                       c = *p;
108 !                   if (c == '`' || vim_isfilec(c))
109 !                       break;
110 ! #ifdef FEAT_MBYTE
111 !                   if (has_mbyte)
112 !                       len = (*mb_ptr2len)(p);
113 !                   else
114 ! #endif
115 !                       len = 1;
116 !                   mb_ptr_adv(p);
117 !               }
118                 if (in_quote)
119                     bow = p;
120                 else
121                     xp->xp_pattern = p;
122 !               p -= len;
123             }
124             mb_ptr_adv(p);
125         }
126 *** ../vim-7.1.080/src/version.c        Sat Aug 18 16:59:43 2007
127 --- src/version.c       Sat Aug 18 17:45:54 2007
128 ***************
129 *** 668,669 ****
130 --- 668,671 ----
131   {   /* Add new patch number below this line */
132 + /**/
133 +     81,
134   /**/
135
136 -- 
137 hundred-and-one symptoms of being an internet addict:
138 194. Your business cards contain your e-mail and home page address.
139
140  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
141 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
142 \\\        download, build and distribute -- http://www.A-A-P.org        ///
143  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
This page took 0.039148 seconds and 3 git commands to generate.