diff --git a/7.2.145 b/7.2.145 new file mode 100644 index 0000000..0f32817 --- /dev/null +++ b/7.2.145 @@ -0,0 +1,125 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.145 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.145 +Problem: White space in ":cscope find" is not ignored. +Solution: Ignore the white space, but not when the leading white space is + useful for the argument. +Files: runtime/doc/if_cscop.txt, src/if_cscope.c + + +*** ../vim-7.2.144/runtime/doc/if_cscop.txt Sat Aug 9 19:36:48 2008 +--- runtime/doc/if_cscop.txt Wed Mar 18 14:30:09 2009 +*************** +*** 1,4 **** +! *if_cscop.txt* For Vim version 7.2. Last change: 2005 Mar 29 + + + VIM REFERENCE MANUAL by Andy Kahn +--- 1,4 ---- +! *if_cscop.txt* For Vim version 7.2. Last change: 2009 Mar 18 + + + VIM REFERENCE MANUAL by Andy Kahn +*************** +*** 131,141 **** + 7 or f: Find this file + 8 or i: Find files #including this file + + EXAMPLES > + :cscope find c vim_free +! :cscope find 3 vim_free + < +! These two examples perform the same query. > + + :cscope find 0 DEFAULT_TERM + < +--- 131,152 ---- + 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 +! < +! These two examples perform the same query: functions calling +! "vim_free". > +! +! :cscope find t initOnce +! :cscope find t initOnce + < +! The first one searches for the text "initOnce", the second one for +! " initOnce". > + + :cscope find 0 DEFAULT_TERM + < +*** ../vim-7.2.144/src/if_cscope.c Wed Mar 18 12:50:58 2009 +--- src/if_cscope.c Wed Mar 18 13:23:53 2009 +*************** +*** 764,769 **** +--- 764,770 ---- + { + char *cmd; + short search; ++ char *pat; + + switch (csoption[0]) + { +*************** +*** 797,806 **** + return NULL; + } + +! if ((cmd = (char *)alloc((unsigned)(strlen(pattern) + 2))) == NULL) + return NULL; + +! (void)sprintf(cmd, "%d%s", search, pattern); + + return cmd; + } /* cs_create_cmd */ +--- 798,814 ---- + return 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, pat); + + return cmd; + } /* cs_create_cmd */ +*** ../vim-7.2.144/src/version.c Wed Mar 18 14:19:28 2009 +--- src/version.c Wed Mar 18 14:28:46 2009 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 145, + /**/ + +-- +Google is kind of like Dr. Who's Tardis; it's weirder on the +inside than on the outside... + + /// 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 ///