]> granicus.if.org Git - vim/commitdiff
updated for version 7.2-145 v7.2.145
authorBram Moolenaar <Bram@vim.org>
Wed, 18 Mar 2009 13:32:24 +0000 (13:32 +0000)
committerBram Moolenaar <Bram@vim.org>
Wed, 18 Mar 2009 13:32:24 +0000 (13:32 +0000)
runtime/doc/if_cscop.txt
src/if_cscope.c
src/version.c

index dae6ebce32596b8451b56628f7519b9859d81821..94d3978203b0d08edca876130f662fd2e0bd0db2 100644 (file)
@@ -1,4 +1,4 @@
-*if_cscop.txt*  For Vim version 7.2.  Last change: 2005 Mar 29
+*if_cscop.txt*  For Vim version 7.2.  Last change: 2009 Mar 18
 
 
                  VIM REFERENCE MANUAL    by Andy Kahn
@@ -131,11 +131,22 @@ The available subcommands are:
                7 or f: Find this file
                8 or i: Find files #including this file
 
+       For all types, except 4 and 6, leading white space for {name} is
+       removed.  For 4 and 6 there is exactly one space between {querytype}
+       and {name}.  Further white space is included in {name}.
+
        EXAMPLES >
            :cscope find c vim_free
-           :cscope find 3 vim_free
+           :cscope find 3  vim_free
+<
+           These two examples perform the same query: functions calling
+           "vim_free". >
+
+           :cscope find t initOnce
+           :cscope find t  initOnce
 <
-           These two examples perform the same query. >
+           The first one searches for the text "initOnce", the second one for
+           " initOnce". >
 
            :cscope find 0 DEFAULT_TERM
 <
index 57d1984bfadf1b31317a0fdeab5d0b27a374cc9e..2407ad03e34ed1760aea35b55d90f8f8b2efd709 100644 (file)
@@ -764,6 +764,7 @@ cs_create_cmd(csoption, pattern)
 {
     char *cmd;
     short search;
+    char *pat;
 
     switch (csoption[0])
     {
@@ -797,10 +798,17 @@ cs_create_cmd(csoption, pattern)
        return NULL;
     }
 
-    if ((cmd = (char *)alloc((unsigned)(strlen(pattern) + 2))) == NULL)
+    /* Skip white space before the patter, except for text and pattern search,
+     * they may want to use the leading white space. */
+    pat = pattern;
+    if (search != 4 && search != 6)
+       while vim_iswhite(*pat)
+           ++pat;
+
+    if ((cmd = (char *)alloc((unsigned)(strlen(pat) + 2))) == NULL)
        return NULL;
 
-    (void)sprintf(cmd, "%d%s", search, pattern);
+    (void)sprintf(cmd, "%d%s", search, pat);
 
     return cmd;
 } /* cs_create_cmd */
index 4873a57e169e66e7441a7d6ad0358776d12a1e6c..252a73848a5f045b9384d2252e9ea6b79656c322 100644 (file)
@@ -676,6 +676,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    145,
 /**/
     144,
 /**/