summaryrefslogtreecommitdiffstats
path: root/source/ap/vim/patches/7.2.145
blob: 0f328170fb369cfb4dd4a25c8ddea3bb295e4ceb (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
To: vim-dev@vim.org
Subject: Patch 7.2.145
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
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    ///