diff options
author | Bram Moolenaar <Bram@vim.org> | 2009-03-18 13:32:24 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2009-03-18 13:32:24 +0000 |
commit | 80b6a0e8d5aee3be938c731ac65c51f266ac7089 (patch) | |
tree | 68dcf62996625bb598c2c6dba0b6feb9881ccb68 | |
parent | c84e8952eb4566a1fa9b1d68cc3d554ab8d5b5f3 (diff) | |
download | vim-git-80b6a0e8d5aee3be938c731ac65c51f266ac7089.tar.gz |
updated for version 7.2-145v7.2.145
-rw-r--r-- | runtime/doc/if_cscop.txt | 17 | ||||
-rw-r--r-- | src/if_cscope.c | 12 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 26 insertions, 5 deletions
diff --git a/runtime/doc/if_cscop.txt b/runtime/doc/if_cscop.txt index dae6ebce3..94d397820 100644 --- a/runtime/doc/if_cscop.txt +++ b/runtime/doc/if_cscop.txt @@ -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 < diff --git a/src/if_cscope.c b/src/if_cscope.c index 57d1984bf..2407ad03e 100644 --- a/src/if_cscope.c +++ b/src/if_cscope.c @@ -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 */ diff --git a/src/version.c b/src/version.c index 4873a57e1..252a73848 100644 --- a/src/version.c +++ b/src/version.c @@ -677,6 +677,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 145, +/**/ 144, /**/ 143, |