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