9ab3ead
To: vim-dev@vim.org
9ab3ead
Subject: Patch 7.2.145
9ab3ead
Fcc: outbox
9ab3ead
From: Bram Moolenaar <Bram@moolenaar.net>
9ab3ead
Mime-Version: 1.0
9ab3ead
Content-Type: text/plain; charset=ISO-8859-1
9ab3ead
Content-Transfer-Encoding: 8bit
9ab3ead
------------
9ab3ead
9ab3ead
Patch 7.2.145
9ab3ead
Problem:    White space in ":cscope find" is not ignored.
9ab3ead
Solution:   Ignore the white space, but not when the leading white space is
9ab3ead
	    useful for the argument.
9ab3ead
Files:	    runtime/doc/if_cscop.txt, src/if_cscope.c
9ab3ead
9ab3ead
9ab3ead
*** ../vim-7.2.144/runtime/doc/if_cscop.txt	Sat Aug  9 19:36:48 2008
9ab3ead
--- runtime/doc/if_cscop.txt	Wed Mar 18 14:30:09 2009
9ab3ead
***************
9ab3ead
*** 1,4 ****
9ab3ead
! *if_cscop.txt*  For Vim version 7.2.  Last change: 2005 Mar 29
9ab3ead
  
9ab3ead
  
9ab3ead
  		  VIM REFERENCE MANUAL    by Andy Kahn
9ab3ead
--- 1,4 ----
9ab3ead
! *if_cscop.txt*  For Vim version 7.2.  Last change: 2009 Mar 18
9ab3ead
  
9ab3ead
  
9ab3ead
  		  VIM REFERENCE MANUAL    by Andy Kahn
9ab3ead
***************
9ab3ead
*** 131,141 ****
9ab3ead
  		7 or f: Find this file
9ab3ead
  		8 or i: Find files #including this file
9ab3ead
  
9ab3ead
  	EXAMPLES >
9ab3ead
  	    :cscope find c vim_free
9ab3ead
! 	    :cscope find 3 vim_free
9ab3ead
  <
9ab3ead
! 	    These two examples perform the same query. >
9ab3ead
  
9ab3ead
  	    :cscope find 0 DEFAULT_TERM
9ab3ead
  <
9ab3ead
--- 131,152 ----
9ab3ead
  		7 or f: Find this file
9ab3ead
  		8 or i: Find files #including this file
9ab3ead
  
9ab3ead
+ 	For all types, except 4 and 6, leading white space for {name} is
9ab3ead
+ 	removed.  For 4 and 6 there is exactly one space between {querytype}
9ab3ead
+ 	and {name}.  Further white space is included in {name}.
9ab3ead
+ 
9ab3ead
  	EXAMPLES >
9ab3ead
  	    :cscope find c vim_free
9ab3ead
! 	    :cscope find 3  vim_free
9ab3ead
! <
9ab3ead
! 	    These two examples perform the same query: functions calling
9ab3ead
! 	    "vim_free". >
9ab3ead
! 
9ab3ead
! 	    :cscope find t initOnce
9ab3ead
! 	    :cscope find t  initOnce
9ab3ead
  <
9ab3ead
! 	    The first one searches for the text "initOnce", the second one for
9ab3ead
! 	    " initOnce". >
9ab3ead
  
9ab3ead
  	    :cscope find 0 DEFAULT_TERM
9ab3ead
  <
9ab3ead
*** ../vim-7.2.144/src/if_cscope.c	Wed Mar 18 12:50:58 2009
9ab3ead
--- src/if_cscope.c	Wed Mar 18 13:23:53 2009
9ab3ead
***************
9ab3ead
*** 764,769 ****
9ab3ead
--- 764,770 ----
9ab3ead
  {
9ab3ead
      char *cmd;
9ab3ead
      short search;
9ab3ead
+     char *pat;
9ab3ead
  
9ab3ead
      switch (csoption[0])
9ab3ead
      {
9ab3ead
***************
9ab3ead
*** 797,806 ****
9ab3ead
  	return NULL;
9ab3ead
      }
9ab3ead
  
9ab3ead
!     if ((cmd = (char *)alloc((unsigned)(strlen(pattern) + 2))) == NULL)
9ab3ead
  	return NULL;
9ab3ead
  
9ab3ead
!     (void)sprintf(cmd, "%d%s", search, pattern);
9ab3ead
  
9ab3ead
      return cmd;
9ab3ead
  } /* cs_create_cmd */
9ab3ead
--- 798,814 ----
9ab3ead
  	return NULL;
9ab3ead
      }
9ab3ead
  
9ab3ead
!     /* Skip white space before the patter, except for text and pattern search,
9ab3ead
!      * they may want to use the leading white space. */
9ab3ead
!     pat = pattern;
9ab3ead
!     if (search != 4 && search != 6)
9ab3ead
! 	while vim_iswhite(*pat)
9ab3ead
! 	    ++pat;
9ab3ead
! 
9ab3ead
!     if ((cmd = (char *)alloc((unsigned)(strlen(pat) + 2))) == NULL)
9ab3ead
  	return NULL;
9ab3ead
  
9ab3ead
!     (void)sprintf(cmd, "%d%s", search, pat);
9ab3ead
  
9ab3ead
      return cmd;
9ab3ead
  } /* cs_create_cmd */
9ab3ead
*** ../vim-7.2.144/src/version.c	Wed Mar 18 14:19:28 2009
9ab3ead
--- src/version.c	Wed Mar 18 14:28:46 2009
9ab3ead
***************
9ab3ead
*** 678,679 ****
9ab3ead
--- 678,681 ----
9ab3ead
  {   /* Add new patch number below this line */
9ab3ead
+ /**/
9ab3ead
+     145,
9ab3ead
  /**/
9ab3ead
9ab3ead
-- 
9ab3ead
Google is kind of like Dr. Who's Tardis; it's weirder on the
9ab3ead
inside than on the outside...
9ab3ead
9ab3ead
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
9ab3ead
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
9ab3ead
\\\        download, build and distribute -- http://www.A-A-P.org        ///
9ab3ead
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///