1 To: [email protected] |
|
2 Subject: Patch 7.2.286 |
|
3 Fcc: outbox |
|
4 From: Bram Moolenaar <[email protected]> |
|
5 Mime-Version: 1.0 |
|
6 Content-Type: text/plain; charset=UTF-8 |
|
7 Content-Transfer-Encoding: 8bit |
|
8 ------------ |
|
9 |
|
10 Patch 7.2.286 (after 7.2.269) |
|
11 Problem: The "--startuptime=<file>" argument is not consistent with other |
|
12 arguments. |
|
13 Solution: Use "--startuptime <file>". Added the +startuptime feature. |
|
14 Files: runtime/doc/eval.txt, runtime/doc/starting.txt, |
|
15 runtime/doc/various.txt, src/eval.c, src/main.c, src/version.c |
|
16 |
|
17 |
|
18 *** ../vim-7.2.285/runtime/doc/eval.txt 2009-04-22 12:53:31.000000000 +0200 |
|
19 --- runtime/doc/eval.txt 2009-11-11 13:01:58.000000000 +0100 |
|
20 *************** |
|
21 *** 5869,5874 **** |
|
22 --- 5881,5887 ---- |
|
23 signs Compiled with |:sign| support. |
|
24 smartindent Compiled with 'smartindent' support. |
|
25 sniff Compiled with SNiFF interface support. |
|
26 + startuptime Compiled with |--startuptime| support. |
|
27 statusline Compiled with support for 'statusline', 'rulerformat' |
|
28 and special formats of 'titlestring' and 'iconstring'. |
|
29 sun_workshop Compiled with support for Sun |workshop|. |
|
30 *** ../vim-7.2.285/runtime/doc/starting.txt 2009-11-03 12:10:39.000000000 +0100 |
|
31 --- runtime/doc/starting.txt 2009-11-11 13:20:56.000000000 +0100 |
|
32 *************** |
|
33 *** 144,155 **** |
|
34 -u NORC no yes |
|
35 --noplugin yes no |
|
36 |
|
37 ! --startuptime={fname} *--startuptime* |
|
38 During startup write timing messages to the file {fname}. |
|
39 This can be used to find out where time is spent while loading |
|
40 ! your .vimrc and plugins. |
|
41 When {fname} already exists new messages are appended. |
|
42 ! {only when compiled with this feature} |
|
43 |
|
44 *--literal* |
|
45 --literal Take file names literally, don't expand wildcards. Not needed |
|
46 --- 144,156 ---- |
|
47 -u NORC no yes |
|
48 --noplugin yes no |
|
49 |
|
50 ! --startuptime {fname} *--startuptime* |
|
51 During startup write timing messages to the file {fname}. |
|
52 This can be used to find out where time is spent while loading |
|
53 ! your .vimrc, plugins and opening the first file. |
|
54 When {fname} already exists new messages are appended. |
|
55 ! (Only available when compiled with the |+startuptime| |
|
56 ! feature). |
|
57 |
|
58 *--literal* |
|
59 --literal Take file names literally, don't expand wildcards. Not needed |
|
60 *** ../vim-7.2.285/runtime/doc/various.txt 2009-07-09 15:55:34.000000000 +0200 |
|
61 --- runtime/doc/various.txt 2009-11-11 13:03:52.000000000 +0100 |
|
62 *************** |
|
63 *** 374,379 **** |
|
64 --- 374,380 ---- |
|
65 B *+signs* |:sign| |
|
66 N *+smartindent* |'smartindent'| |
|
67 m *+sniff* SniFF interface |sniff| |
|
68 + N *+startuptime* |--startuptime| argument |
|
69 N *+statusline* Options 'statusline', 'rulerformat' and special |
|
70 formats of 'titlestring' and 'iconstring' |
|
71 m *+sun_workshop* |workshop| |
|
72 *** ../vim-7.2.285/src/eval.c 2009-11-03 14:26:29.000000000 +0100 |
|
73 --- src/eval.c 2009-11-11 12:59:53.000000000 +0100 |
|
74 *************** |
|
75 *** 11736,11741 **** |
|
76 --- 11736,11744 ---- |
|
77 #ifdef FEAT_SNIFF |
|
78 "sniff", |
|
79 #endif |
|
80 + #ifdef STARTUPTIME |
|
81 + "startuptime", |
|
82 + #endif |
|
83 #ifdef FEAT_STL_OPT |
|
84 "statusline", |
|
85 #endif |
|
86 *** ../vim-7.2.285/src/main.c 2009-11-03 12:10:39.000000000 +0100 |
|
87 --- src/main.c 2009-11-08 12:57:46.000000000 +0100 |
|
88 *************** |
|
89 *** 204,212 **** |
|
90 #ifdef STARTUPTIME |
|
91 for (i = 1; i < argc; ++i) |
|
92 { |
|
93 ! if (STRNICMP(argv[i], "--startuptime=", 14) == 0) |
|
94 { |
|
95 ! time_fd = mch_fopen(argv[i] + 14, "a"); |
|
96 TIME_MSG("--- VIM STARTING ---"); |
|
97 break; |
|
98 } |
|
99 --- 204,212 ---- |
|
100 #ifdef STARTUPTIME |
|
101 for (i = 1; i < argc; ++i) |
|
102 { |
|
103 ! if (STRICMP(argv[i], "--startuptime") == 0 && i + 1 < argc) |
|
104 { |
|
105 ! time_fd = mch_fopen(argv[i + 1], "a"); |
|
106 TIME_MSG("--- VIM STARTING ---"); |
|
107 break; |
|
108 } |
|
109 *************** |
|
110 *** 1726,1731 **** |
|
111 --- 1726,1736 ---- |
|
112 want_argument = TRUE; |
|
113 argv_idx += 3; |
|
114 } |
|
115 + else if (STRNICMP(argv[0] + argv_idx, "startuptime", 11) == 0) |
|
116 + { |
|
117 + want_argument = TRUE; |
|
118 + argv_idx += 11; |
|
119 + } |
|
120 #ifdef FEAT_CLIENTSERVER |
|
121 else if (STRNICMP(argv[0] + argv_idx, "serverlist", 10) == 0) |
|
122 ; /* already processed -- no arg */ |
|
123 *************** |
|
124 *** 1761,1770 **** |
|
125 /* already processed, skip */ |
|
126 } |
|
127 #endif |
|
128 - else if (STRNICMP(argv[0] + argv_idx, "startuptime", 11) == 0) |
|
129 - { |
|
130 - /* already processed, skip */ |
|
131 - } |
|
132 else |
|
133 { |
|
134 if (argv[0][argv_idx]) |
|
135 --- 1766,1771 ---- |
|
136 *************** |
|
137 *** 2061,2067 **** |
|
138 mainerr(ME_GARBAGE, (char_u *)argv[0]); |
|
139 |
|
140 --argc; |
|
141 ! if (argc < 1 && c != 'S') |
|
142 mainerr_arg_missing((char_u *)argv[0]); |
|
143 ++argv; |
|
144 argv_idx = -1; |
|
145 --- 2062,2068 ---- |
|
146 mainerr(ME_GARBAGE, (char_u *)argv[0]); |
|
147 |
|
148 --argc; |
|
149 ! if (argc < 1 && c != 'S') /* -S has an optional argument */ |
|
150 mainerr_arg_missing((char_u *)argv[0]); |
|
151 ++argv; |
|
152 argv_idx = -1; |
|
153 *************** |
|
154 *** 2102,2112 **** |
|
155 (char_u *)argv[0]; |
|
156 break; |
|
157 |
|
158 ! case '-': /* "--cmd {command}" execute command */ |
|
159 ! if (parmp->n_pre_commands >= MAX_ARG_CMDS) |
|
160 ! mainerr(ME_EXTRA_CMD, NULL); |
|
161 ! parmp->pre_commands[parmp->n_pre_commands++] = |
|
162 (char_u *)argv[0]; |
|
163 break; |
|
164 |
|
165 /* case 'd': -d {device} is handled in mch_check_win() for the |
|
166 --- 2103,2118 ---- |
|
167 (char_u *)argv[0]; |
|
168 break; |
|
169 |
|
170 ! case '-': |
|
171 ! if (argv[-1][2] == 'c') |
|
172 ! { |
|
173 ! /* "--cmd {command}" execute command */ |
|
174 ! if (parmp->n_pre_commands >= MAX_ARG_CMDS) |
|
175 ! mainerr(ME_EXTRA_CMD, NULL); |
|
176 ! parmp->pre_commands[parmp->n_pre_commands++] = |
|
177 (char_u *)argv[0]; |
|
178 + } |
|
179 + /* "--startuptime <file>" already handled */ |
|
180 break; |
|
181 |
|
182 /* case 'd': -d {device} is handled in mch_check_win() for the |
|
183 *************** |
|
184 *** 3144,3149 **** |
|
185 --- 3150,3158 ---- |
|
186 main_msg(_("--serverlist\t\tList available Vim server names and exit")); |
|
187 main_msg(_("--servername <name>\tSend to/become the Vim server <name>")); |
|
188 #endif |
|
189 + #ifdef STARTUPTIME |
|
190 + main_msg(_("--startuptime=<file>\tWrite startup timing messages to <file>")); |
|
191 + #endif |
|
192 #ifdef FEAT_VIMINFO |
|
193 main_msg(_("-i <viminfo>\t\tUse <viminfo> instead of .viminfo")); |
|
194 #endif |
|
195 *** ../vim-7.2.285/src/version.c 2009-11-11 13:22:09.000000000 +0100 |
|
196 --- src/version.c 2009-11-11 14:17:28.000000000 +0100 |
|
197 *************** |
|
198 *** 494,499 **** |
|
199 --- 494,504 ---- |
|
200 #else |
|
201 "-sniff", |
|
202 #endif |
|
203 + #ifdef STARTUPTIME |
|
204 + "+startuptime", |
|
205 + #else |
|
206 + "-startuptime", |
|
207 + #endif |
|
208 #ifdef FEAT_STL_OPT |
|
209 "+statusline", |
|
210 #else |
|
211 *** ../vim-7.2.285/src/version.c 2009-11-11 13:22:09.000000000 +0100 |
|
212 --- src/version.c 2009-11-11 14:17:28.000000000 +0100 |
|
213 *************** |
|
214 *** 678,679 **** |
|
215 --- 683,686 ---- |
|
216 { /* Add new patch number below this line */ |
|
217 + /**/ |
|
218 + 286, |
|
219 /**/ |
|
220 |
|
221 -- |
|
222 A fool must search for a greater fool to find admiration. |
|
223 |
|
224 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ |
|
225 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ |
|
226 \\\ download, build and distribute -- http://www.A-A-P.org /// |
|
227 \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |
|