]> granicus.if.org Git - vim/commitdiff
updated for version 7.2-286 v7.2.286
authorBram Moolenaar <Bram@vim.org>
Wed, 11 Nov 2009 13:22:11 +0000 (13:22 +0000)
committerBram Moolenaar <Bram@vim.org>
Wed, 11 Nov 2009 13:22:11 +0000 (13:22 +0000)
runtime/doc/eval.txt
runtime/doc/starting.txt
runtime/doc/various.txt
src/eval.c
src/main.c
src/version.c

index 6a57ae524eb76040146e8a75c48ad71f6e0f2f0d..ba498af2f7c0bf2e0af7c11a21ff14b9470b92e5 100644 (file)
@@ -5869,6 +5869,7 @@ showcmd                   Compiled with 'showcmd' support.
 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|.
index c1ed1b80c650cc426f9bc438b0ba58ef8162c37f..4c126516c458c554edbe74c130e2df06d28f456c 100644 (file)
@@ -144,12 +144,13 @@ a slash.  Thus "-R" means recovery and "-/R" readonly.
                        -u NORC                 no                  yes
                        --noplugin              yes                 no
 
---startuptime={fname}                                  *--startuptime*
+--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.
+               your .vimrc, plugins and opening the first file.
                When {fname} already exists new messages are appended.
-               {only when compiled with this feature}
+               (Only available when compiled with the |+startuptime|
+               feature).
 
                                                        *--literal*
 --literal      Take file names literally, don't expand wildcards.  Not needed
index ffb9f2682ba2fdc9e7d5d004038f6b6329786113..1755e4ca03daa7219297e014c7cef471b598514b 100644 (file)
@@ -374,6 +374,7 @@ N  *+scrollbind*    |'scrollbind'|
 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|
index aff6152ec60d1d8552aec400eca2a80e8dce1399..40fcfefbf6001f6197e69060b946fc015c8e98d7 100644 (file)
@@ -11736,6 +11736,9 @@ f_has(argvars, rettv)
 #ifdef FEAT_SNIFF
        "sniff",
 #endif
+#ifdef STARTUPTIME
+       "startuptime",
+#endif
 #ifdef FEAT_STL_OPT
        "statusline",
 #endif
index 5bb81a6003333a9656a7faed611d28e53eb82048..13707ce11096dfc803e91913510526398815a9db 100644 (file)
@@ -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
index fbb9f44af2c0361f6f6ec7956dcbc72804be03f3..15ffd8e4ddacf7ae5493ce9186fab61b5f70f78d 100644 (file)
@@ -494,6 +494,11 @@ static char *(features[]) =
 #else
        "-sniff",
 #endif
+#ifdef STARTUPTIME
+       "+startuptime",
+#else
+       "-startuptime",
+#endif
 #ifdef FEAT_STL_OPT
        "+statusline",
 #else
@@ -676,6 +681,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    286,
 /**/
     285,
 /**/