summaryrefslogtreecommitdiff
path: root/source/ap/vim/patches/7.3.129
blob: 10f11d61cccdedf5bc6502688e4755c7cd61ca92 (plain)
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
To: vim_dev@googlegroups.com
Subject: Patch 7.3.129
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 7.3.129
Problem:    Using integer like a boolean.
Solution:   Nicer check for integer being non-zero.
Files:	    src/tag.c


*** ../vim-7.3.128/src/tag.c	2010-12-17 18:06:00.000000000 +0100
--- src/tag.c	2010-12-17 17:49:35.000000000 +0100
***************
*** 204,210 ****
      else
      {
  #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
! 	if (g_do_tagpreview)
  	    use_tagstack = FALSE;
  	else
  #endif
--- 204,210 ----
      else
      {
  #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
! 	if (g_do_tagpreview != 0)
  	    use_tagstack = FALSE;
  	else
  #endif
***************
*** 222,228 ****
  		    ))
  	{
  #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
! 	    if (g_do_tagpreview)
  	    {
  		if (ptag_entry.tagname != NULL
  			&& STRCMP(ptag_entry.tagname, tag) == 0)
--- 222,228 ----
  		    ))
  	{
  #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
! 	    if (g_do_tagpreview != 0)
  	    {
  		if (ptag_entry.tagname != NULL
  			&& STRCMP(ptag_entry.tagname, tag) == 0)
***************
*** 278,284 ****
  	{
  	    if (
  #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
! 		    g_do_tagpreview ? ptag_entry.tagname == NULL :
  #endif
  		    tagstacklen == 0)
  	    {
--- 278,284 ----
  	{
  	    if (
  #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
! 		    g_do_tagpreview != 0 ? ptag_entry.tagname == NULL :
  #endif
  		    tagstacklen == 0)
  	    {
***************
*** 361,367 ****
  	       )
  	    {
  #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
! 		if (g_do_tagpreview)
  		{
  		    cur_match = ptag_entry.cur_match;
  		    cur_fnum = ptag_entry.cur_fnum;
--- 361,367 ----
  	       )
  	    {
  #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
! 		if (g_do_tagpreview != 0)
  		{
  		    cur_match = ptag_entry.cur_match;
  		    cur_fnum = ptag_entry.cur_fnum;
***************
*** 399,405 ****
  		prevtagstackidx = tagstackidx;
  
  #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
! 		if (g_do_tagpreview)
  		{
  		    cur_match = ptag_entry.cur_match;
  		    cur_fnum = ptag_entry.cur_fnum;
--- 399,405 ----
  		prevtagstackidx = tagstackidx;
  
  #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
! 		if (g_do_tagpreview != 0)
  		{
  		    cur_match = ptag_entry.cur_match;
  		    cur_fnum = ptag_entry.cur_fnum;
***************
*** 437,443 ****
  	}
  
  #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
! 	if (g_do_tagpreview)
  	{
  	    if (type != DT_SELECT && type != DT_JUMP)
  	    {
--- 437,443 ----
  	}
  
  #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
! 	if (g_do_tagpreview != 0)
  	{
  	    if (type != DT_SELECT && type != DT_JUMP)
  	    {
***************
*** 492,498 ****
  	if (use_tagstack)
  	    name = tagstack[tagstackidx].tagname;
  #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
! 	else if (g_do_tagpreview)
  	    name = ptag_entry.tagname;
  #endif
  	else
--- 492,498 ----
  	if (use_tagstack)
  	    name = tagstack[tagstackidx].tagname;
  #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
! 	else if (g_do_tagpreview != 0)
  	    name = ptag_entry.tagname;
  #endif
  	else
***************
*** 620,626 ****
  		    parse_match(matches[i], &tagp);
  		    if (!new_tag && (
  #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
! 				(g_do_tagpreview
  				 && i == ptag_entry.cur_match) ||
  #endif
  				(use_tagstack
--- 620,626 ----
  		    parse_match(matches[i], &tagp);
  		    if (!new_tag && (
  #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
! 				(g_do_tagpreview != 0
  				 && i == ptag_entry.cur_match) ||
  #endif
  				(use_tagstack
***************
*** 962,968 ****
  		++tagstackidx;
  	    }
  #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
! 	    else if (g_do_tagpreview)
  	    {
  		ptag_entry.cur_match = cur_match;
  		ptag_entry.cur_fnum = cur_fnum;
--- 962,968 ----
  		++tagstackidx;
  	    }
  #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
! 	    else if (g_do_tagpreview != 0)
  	    {
  		ptag_entry.cur_match = cur_match;
  		ptag_entry.cur_fnum = cur_fnum;
***************
*** 3110,3116 ****
  #endif
  
  #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
!     if (g_do_tagpreview)
      {
  	postponed_split = 0;	/* don't split again below */
  	curwin_save = curwin;	/* Save current window */
--- 3110,3116 ----
  #endif
  
  #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
!     if (g_do_tagpreview != 0)
      {
  	postponed_split = 0;	/* don't split again below */
  	curwin_save = curwin;	/* Save current window */
***************
*** 3148,3154 ****
  	/* A :ta from a help file will keep the b_help flag set.  For ":ptag"
  	 * we need to use the flag from the window where we came from. */
  #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
! 	if (g_do_tagpreview)
  	    keep_help_flag = curwin_save->w_buffer->b_help;
  	else
  #endif
--- 3148,3154 ----
  	/* A :ta from a help file will keep the b_help flag set.  For ":ptag"
  	 * we need to use the flag from the window where we came from. */
  #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
! 	if (g_do_tagpreview != 0)
  	    keep_help_flag = curwin_save->w_buffer->b_help;
  	else
  #endif
***************
*** 3322,3328 ****
  	}
  
  #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
! 	if (g_do_tagpreview && curwin != curwin_save && win_valid(curwin_save))
  	{
  	    /* Return cursor to where we were */
  	    validate_cursor();
--- 3322,3329 ----
  	}
  
  #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
! 	if (g_do_tagpreview != 0
! 			   && curwin != curwin_save && win_valid(curwin_save))
  	{
  	    /* Return cursor to where we were */
  	    validate_cursor();
*** ../vim-7.3.128/src/version.c	2011-02-25 15:11:17.000000000 +0100
--- src/version.c	2011-02-25 15:12:25.000000000 +0100
***************
*** 716,717 ****
--- 716,719 ----
  {   /* Add new patch number below this line */
+ /**/
+     129,
  /**/

-- 
PRINCE:    He's come to rescue me, father.
LAUNCELOT: (embarrassed) Well, let's not jump to conclusions ...
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///