1 To: [email protected] |
|
2 Subject: Patch 7.2.145 |
|
3 Fcc: outbox |
|
4 From: Bram Moolenaar <[email protected]> |
|
5 Mime-Version: 1.0 |
|
6 Content-Type: text/plain; charset=ISO-8859-1 |
|
7 Content-Transfer-Encoding: 8bit |
|
8 ------------ |
|
9 |
|
10 Patch 7.2.145 |
|
11 Problem: White space in ":cscope find" is not ignored. |
|
12 Solution: Ignore the white space, but not when the leading white space is |
|
13 useful for the argument. |
|
14 Files: runtime/doc/if_cscop.txt, src/if_cscope.c |
|
15 |
|
16 |
|
17 *** ../vim-7.2.144/runtime/doc/if_cscop.txt Sat Aug 9 19:36:48 2008 |
|
18 --- runtime/doc/if_cscop.txt Wed Mar 18 14:30:09 2009 |
|
19 *************** |
|
20 *** 1,4 **** |
|
21 ! *if_cscop.txt* For Vim version 7.2. Last change: 2005 Mar 29 |
|
22 |
|
23 |
|
24 VIM REFERENCE MANUAL by Andy Kahn |
|
25 --- 1,4 ---- |
|
26 ! *if_cscop.txt* For Vim version 7.2. Last change: 2009 Mar 18 |
|
27 |
|
28 |
|
29 VIM REFERENCE MANUAL by Andy Kahn |
|
30 *************** |
|
31 *** 131,141 **** |
|
32 7 or f: Find this file |
|
33 8 or i: Find files #including this file |
|
34 |
|
35 EXAMPLES > |
|
36 :cscope find c vim_free |
|
37 ! :cscope find 3 vim_free |
|
38 < |
|
39 ! These two examples perform the same query. > |
|
40 |
|
41 :cscope find 0 DEFAULT_TERM |
|
42 < |
|
43 --- 131,152 ---- |
|
44 7 or f: Find this file |
|
45 8 or i: Find files #including this file |
|
46 |
|
47 + For all types, except 4 and 6, leading white space for {name} is |
|
48 + removed. For 4 and 6 there is exactly one space between {querytype} |
|
49 + and {name}. Further white space is included in {name}. |
|
50 + |
|
51 EXAMPLES > |
|
52 :cscope find c vim_free |
|
53 ! :cscope find 3 vim_free |
|
54 ! < |
|
55 ! These two examples perform the same query: functions calling |
|
56 ! "vim_free". > |
|
57 ! |
|
58 ! :cscope find t initOnce |
|
59 ! :cscope find t initOnce |
|
60 < |
|
61 ! The first one searches for the text "initOnce", the second one for |
|
62 ! " initOnce". > |
|
63 |
|
64 :cscope find 0 DEFAULT_TERM |
|
65 < |
|
66 *** ../vim-7.2.144/src/if_cscope.c Wed Mar 18 12:50:58 2009 |
|
67 --- src/if_cscope.c Wed Mar 18 13:23:53 2009 |
|
68 *************** |
|
69 *** 764,769 **** |
|
70 --- 764,770 ---- |
|
71 { |
|
72 char *cmd; |
|
73 short search; |
|
74 + char *pat; |
|
75 |
|
76 switch (csoption[0]) |
|
77 { |
|
78 *************** |
|
79 *** 797,806 **** |
|
80 return NULL; |
|
81 } |
|
82 |
|
83 ! if ((cmd = (char *)alloc((unsigned)(strlen(pattern) + 2))) == NULL) |
|
84 return NULL; |
|
85 |
|
86 ! (void)sprintf(cmd, "%d%s", search, pattern); |
|
87 |
|
88 return cmd; |
|
89 } /* cs_create_cmd */ |
|
90 --- 798,814 ---- |
|
91 return NULL; |
|
92 } |
|
93 |
|
94 ! /* Skip white space before the patter, except for text and pattern search, |
|
95 ! * they may want to use the leading white space. */ |
|
96 ! pat = pattern; |
|
97 ! if (search != 4 && search != 6) |
|
98 ! while vim_iswhite(*pat) |
|
99 ! ++pat; |
|
100 ! |
|
101 ! if ((cmd = (char *)alloc((unsigned)(strlen(pat) + 2))) == NULL) |
|
102 return NULL; |
|
103 |
|
104 ! (void)sprintf(cmd, "%d%s", search, pat); |
|
105 |
|
106 return cmd; |
|
107 } /* cs_create_cmd */ |
|
108 *** ../vim-7.2.144/src/version.c Wed Mar 18 14:19:28 2009 |
|
109 --- src/version.c Wed Mar 18 14:28:46 2009 |
|
110 *************** |
|
111 *** 678,679 **** |
|
112 --- 678,681 ---- |
|
113 { /* Add new patch number below this line */ |
|
114 + /**/ |
|
115 + 145, |
|
116 /**/ |
|
117 |
|
118 -- |
|
119 Google is kind of like Dr. Who's Tardis; it's weirder on the |
|
120 inside than on the outside... |
|
121 |
|
122 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ |
|
123 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ |
|
124 \\\ download, build and distribute -- http://www.A-A-P.org /// |
|
125 \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |
|