summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2009-11-11 13:22:11 +0000
committerBram Moolenaar <Bram@vim.org>2009-11-11 13:22:11 +0000
commitef94eec64431f053ac868f3c19d389057cf97772 (patch)
tree7cc708a076c6022937e83feb8263d24fe3596908 /src
parent76675565acc95e5b434e79213ffd3e995dabfbb5 (diff)
updated for version 7.2-286v7.2.286
Diffstat (limited to 'src')
-rw-r--r--src/eval.c3
-rw-r--r--src/main.c31
-rw-r--r--src/version.c7
3 files changed, 30 insertions, 11 deletions
diff --git a/src/eval.c b/src/eval.c
index aff6152ec6..40fcfefbf6 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -11736,6 +11736,9 @@ f_has(argvars, rettv)
#ifdef FEAT_SNIFF
"sniff",
#endif
+#ifdef STARTUPTIME
+ "startuptime",
+#endif
#ifdef FEAT_STL_OPT
"statusline",
#endif
diff --git a/src/main.c b/src/main.c
index 5bb81a6003..13707ce110 100644
--- a/src/main.c
+++ b/src/main.c
@@ -204,9 +204,9 @@ main
#ifdef STARTUPTIME
for (i = 1; i < argc; ++i)
{
- if (STRNICMP(argv[i], "--startuptime=", 14) == 0)
+ if (STRICMP(argv[i], "--startuptime") == 0 && i + 1 < argc)
{
- time_fd = mch_fopen(argv[i] + 14, "a");
+ time_fd = mch_fopen(argv[i + 1], "a");
TIME_MSG("--- VIM STARTING ---");
break;
}
@@ -1726,6 +1726,11 @@ command_line_scan(parmp)
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,10 +1766,6 @@ command_line_scan(parmp)
/* already processed, skip */
}
#endif
- else if (STRNICMP(argv[0] + argv_idx, "startuptime", 11) == 0)
- {
- /* already processed, skip */
- }
else
{
if (argv[0][argv_idx])
@@ -2061,7 +2062,7 @@ command_line_scan(parmp)
mainerr(ME_GARBAGE, (char_u *)argv[0]);
--argc;
- if (argc < 1 && c != 'S')
+ if (argc < 1 && c != 'S') /* -S has an optional argument */
mainerr_arg_missing((char_u *)argv[0]);
++argv;
argv_idx = -1;
@@ -2102,11 +2103,16 @@ command_line_scan(parmp)
(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++] =
+ 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,6 +3150,9 @@ usage()
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
diff --git a/src/version.c b/src/version.c
index fbb9f44af2..15ffd8e4dd 100644
--- a/src/version.c
+++ b/src/version.c
@@ -494,6 +494,11 @@ static char *(features[]) =
#else
"-sniff",
#endif
+#ifdef STARTUPTIME
+ "+startuptime",
+#else
+ "-startuptime",
+#endif
#ifdef FEAT_STL_OPT
"+statusline",
#else
@@ -677,6 +682,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 286,
+/**/
285,
/**/
284,