summaryrefslogtreecommitdiff
path: root/source/ap/vim/patches/7.2.286
blob: 7577502f014616b48a9612e1ffe58bd5466b3b7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
To: vim-dev@vim.org
Subject: Patch 7.2.286
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 7.2.286 (after 7.2.269)
Problem:    The "--startuptime=<file>" argument is not consistent with other
	    arguments.
Solution:   Use "--startuptime <file>".  Added the +startuptime feature.
Files:	    runtime/doc/eval.txt, runtime/doc/starting.txt,
	    runtime/doc/various.txt, src/eval.c, src/main.c, src/version.c


*** ../vim-7.2.285/runtime/doc/eval.txt	2009-04-22 12:53:31.000000000 +0200
--- runtime/doc/eval.txt	2009-11-11 13:01:58.000000000 +0100
***************
*** 5869,5874 ****
--- 5881,5887 ----
  signs			Compiled with |:sign| support.
  smartindent		Compiled with 'smartindent' support.
  sniff			Compiled with SNiFF interface support.
+ startuptime		Compiled with |--startuptime| support.
  statusline		Compiled with support for 'statusline', 'rulerformat'
  			and special formats of 'titlestring' and 'iconstring'.
  sun_workshop		Compiled with support for Sun |workshop|.
*** ../vim-7.2.285/runtime/doc/starting.txt	2009-11-03 12:10:39.000000000 +0100
--- runtime/doc/starting.txt	2009-11-11 13:20:56.000000000 +0100
***************
*** 144,155 ****
  			-u NORC			no		    yes
  			--noplugin		yes		    no
  
! --startuptime={fname}					*--startuptime*
  		During startup write timing messages to the file {fname}.
  		This can be used to find out where time is spent while loading
! 		your .vimrc and plugins.
  		When {fname} already exists new messages are appended.
! 		{only when compiled with this feature}
  
  							*--literal*
  --literal	Take file names literally, don't expand wildcards.  Not needed
--- 144,156 ----
  			-u NORC			no		    yes
  			--noplugin		yes		    no
  
! --startuptime {fname}					*--startuptime*
  		During startup write timing messages to the file {fname}.
  		This can be used to find out where time is spent while loading
! 		your .vimrc, plugins and opening the first file.
  		When {fname} already exists new messages are appended.
! 		(Only available when compiled with the |+startuptime|
! 		feature).
  
  							*--literal*
  --literal	Take file names literally, don't expand wildcards.  Not needed
*** ../vim-7.2.285/runtime/doc/various.txt	2009-07-09 15:55:34.000000000 +0200
--- runtime/doc/various.txt	2009-11-11 13:03:52.000000000 +0100
***************
*** 374,379 ****
--- 374,380 ----
  B  *+signs*		|:sign|
  N  *+smartindent*	|'smartindent'|
  m  *+sniff*		SniFF interface |sniff|
+ N  *+startuptime*	|--startuptime| argument
  N  *+statusline*	Options 'statusline', 'rulerformat' and special
  			formats of 'titlestring' and 'iconstring'
  m  *+sun_workshop*	|workshop|
*** ../vim-7.2.285/src/eval.c	2009-11-03 14:26:29.000000000 +0100
--- src/eval.c	2009-11-11 12:59:53.000000000 +0100
***************
*** 11736,11741 ****
--- 11736,11744 ----
  #ifdef FEAT_SNIFF
  	"sniff",
  #endif
+ #ifdef STARTUPTIME
+ 	"startuptime",
+ #endif
  #ifdef FEAT_STL_OPT
  	"statusline",
  #endif
*** ../vim-7.2.285/src/main.c	2009-11-03 12:10:39.000000000 +0100
--- src/main.c	2009-11-08 12:57:46.000000000 +0100
***************
*** 204,212 ****
  #ifdef STARTUPTIME
      for (i = 1; i < argc; ++i)
      {
! 	if (STRNICMP(argv[i], "--startuptime=", 14) == 0)
  	{
! 	    time_fd = mch_fopen(argv[i] + 14, "a");
  	    TIME_MSG("--- VIM STARTING ---");
  	    break;
  	}
--- 204,212 ----
  #ifdef STARTUPTIME
      for (i = 1; i < argc; ++i)
      {
! 	if (STRICMP(argv[i], "--startuptime") == 0 && i + 1 < argc)
  	{
! 	    time_fd = mch_fopen(argv[i + 1], "a");
  	    TIME_MSG("--- VIM STARTING ---");
  	    break;
  	}
***************
*** 1726,1731 ****
--- 1726,1736 ----
  		    want_argument = TRUE;
  		    argv_idx += 3;
  		}
+ 		else if (STRNICMP(argv[0] + argv_idx, "startuptime", 11) == 0)
+ 		{
+ 		    want_argument = TRUE;
+ 		    argv_idx += 11;
+ 		}
  #ifdef FEAT_CLIENTSERVER
  		else if (STRNICMP(argv[0] + argv_idx, "serverlist", 10) == 0)
  		    ; /* already processed -- no arg */
***************
*** 1761,1770 ****
  		    /* already processed, skip */
  		}
  #endif
- 		else if (STRNICMP(argv[0] + argv_idx, "startuptime", 11) == 0)
- 		{
- 		    /* already processed, skip */
- 		}
  		else
  		{
  		    if (argv[0][argv_idx])
--- 1766,1771 ----
***************
*** 2061,2067 ****
  		    mainerr(ME_GARBAGE, (char_u *)argv[0]);
  
  		--argc;
! 		if (argc < 1 && c != 'S')
  		    mainerr_arg_missing((char_u *)argv[0]);
  		++argv;
  		argv_idx = -1;
--- 2062,2068 ----
  		    mainerr(ME_GARBAGE, (char_u *)argv[0]);
  
  		--argc;
! 		if (argc < 1 && c != 'S')  /* -S has an optional argument */
  		    mainerr_arg_missing((char_u *)argv[0]);
  		++argv;
  		argv_idx = -1;
***************
*** 2102,2112 ****
  							    (char_u *)argv[0];
  		    break;
  
! 		case '-':	/* "--cmd {command}" execute command */
! 		    if (parmp->n_pre_commands >= MAX_ARG_CMDS)
! 			mainerr(ME_EXTRA_CMD, NULL);
! 		    parmp->pre_commands[parmp->n_pre_commands++] =
  							    (char_u *)argv[0];
  		    break;
  
  	    /*	case 'd':   -d {device} is handled in mch_check_win() for the
--- 2103,2118 ----
  							    (char_u *)argv[0];
  		    break;
  
! 		case '-':
! 		    if (argv[-1][2] == 'c')
! 		    {
! 			/* "--cmd {command}" execute command */
! 			if (parmp->n_pre_commands >= MAX_ARG_CMDS)
! 			    mainerr(ME_EXTRA_CMD, NULL);
! 			parmp->pre_commands[parmp->n_pre_commands++] =
  							    (char_u *)argv[0];
+ 		    }
+ 		    /* "--startuptime <file>" already handled */
  		    break;
  
  	    /*	case 'd':   -d {device} is handled in mch_check_win() for the
***************
*** 3144,3149 ****
--- 3150,3158 ----
      main_msg(_("--serverlist\t\tList available Vim server names and exit"));
      main_msg(_("--servername <name>\tSend to/become the Vim server <name>"));
  #endif
+ #ifdef STARTUPTIME
+     main_msg(_("--startuptime=<file>\tWrite startup timing messages to <file>"));
+ #endif
  #ifdef FEAT_VIMINFO
      main_msg(_("-i <viminfo>\t\tUse <viminfo> instead of .viminfo"));
  #endif
*** ../vim-7.2.285/src/version.c	2009-11-11 13:22:09.000000000 +0100
--- src/version.c	2009-11-11 14:17:28.000000000 +0100
***************
*** 494,499 ****
--- 494,504 ----
  #else
  	"-sniff",
  #endif
+ #ifdef STARTUPTIME
+ 	"+startuptime",
+ #else
+ 	"-startuptime",
+ #endif
  #ifdef FEAT_STL_OPT
  	"+statusline",
  #else
*** ../vim-7.2.285/src/version.c	2009-11-11 13:22:09.000000000 +0100
--- src/version.c	2009-11-11 14:17:28.000000000 +0100
***************
*** 678,679 ****
--- 683,686 ----
  {   /* Add new patch number below this line */
+ /**/
+     286,
  /**/

-- 
A fool must search for a greater fool to find admiration.

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///