]> git.pld-linux.org Git - packages/vim.git/blob - 7.3.129
- new
[packages/vim.git] / 7.3.129
1 To: vim_dev@googlegroups.com
2 Subject: Patch 7.3.129
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8 ------------
9
10 Patch 7.3.129
11 Problem:    Using integer like a boolean.
12 Solution:   Nicer check for integer being non-zero.
13 Files:      src/tag.c
14
15
16 *** ../vim-7.3.128/src/tag.c    2010-12-17 18:06:00.000000000 +0100
17 --- src/tag.c   2010-12-17 17:49:35.000000000 +0100
18 ***************
19 *** 204,210 ****
20       else
21       {
22   #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
23 !       if (g_do_tagpreview)
24             use_tagstack = FALSE;
25         else
26   #endif
27 --- 204,210 ----
28       else
29       {
30   #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
31 !       if (g_do_tagpreview != 0)
32             use_tagstack = FALSE;
33         else
34   #endif
35 ***************
36 *** 222,228 ****
37                     ))
38         {
39   #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
40 !           if (g_do_tagpreview)
41             {
42                 if (ptag_entry.tagname != NULL
43                         && STRCMP(ptag_entry.tagname, tag) == 0)
44 --- 222,228 ----
45                     ))
46         {
47   #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
48 !           if (g_do_tagpreview != 0)
49             {
50                 if (ptag_entry.tagname != NULL
51                         && STRCMP(ptag_entry.tagname, tag) == 0)
52 ***************
53 *** 278,284 ****
54         {
55             if (
56   #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
57 !                   g_do_tagpreview ? ptag_entry.tagname == NULL :
58   #endif
59                     tagstacklen == 0)
60             {
61 --- 278,284 ----
62         {
63             if (
64   #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
65 !                   g_do_tagpreview != 0 ? ptag_entry.tagname == NULL :
66   #endif
67                     tagstacklen == 0)
68             {
69 ***************
70 *** 361,367 ****
71                )
72             {
73   #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
74 !               if (g_do_tagpreview)
75                 {
76                     cur_match = ptag_entry.cur_match;
77                     cur_fnum = ptag_entry.cur_fnum;
78 --- 361,367 ----
79                )
80             {
81   #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
82 !               if (g_do_tagpreview != 0)
83                 {
84                     cur_match = ptag_entry.cur_match;
85                     cur_fnum = ptag_entry.cur_fnum;
86 ***************
87 *** 399,405 ****
88                 prevtagstackidx = tagstackidx;
89   
90   #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
91 !               if (g_do_tagpreview)
92                 {
93                     cur_match = ptag_entry.cur_match;
94                     cur_fnum = ptag_entry.cur_fnum;
95 --- 399,405 ----
96                 prevtagstackidx = tagstackidx;
97   
98   #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
99 !               if (g_do_tagpreview != 0)
100                 {
101                     cur_match = ptag_entry.cur_match;
102                     cur_fnum = ptag_entry.cur_fnum;
103 ***************
104 *** 437,443 ****
105         }
106   
107   #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
108 !       if (g_do_tagpreview)
109         {
110             if (type != DT_SELECT && type != DT_JUMP)
111             {
112 --- 437,443 ----
113         }
114   
115   #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
116 !       if (g_do_tagpreview != 0)
117         {
118             if (type != DT_SELECT && type != DT_JUMP)
119             {
120 ***************
121 *** 492,498 ****
122         if (use_tagstack)
123             name = tagstack[tagstackidx].tagname;
124   #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
125 !       else if (g_do_tagpreview)
126             name = ptag_entry.tagname;
127   #endif
128         else
129 --- 492,498 ----
130         if (use_tagstack)
131             name = tagstack[tagstackidx].tagname;
132   #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
133 !       else if (g_do_tagpreview != 0)
134             name = ptag_entry.tagname;
135   #endif
136         else
137 ***************
138 *** 620,626 ****
139                     parse_match(matches[i], &tagp);
140                     if (!new_tag && (
141   #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
142 !                               (g_do_tagpreview
143                                  && i == ptag_entry.cur_match) ||
144   #endif
145                                 (use_tagstack
146 --- 620,626 ----
147                     parse_match(matches[i], &tagp);
148                     if (!new_tag && (
149   #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
150 !                               (g_do_tagpreview != 0
151                                  && i == ptag_entry.cur_match) ||
152   #endif
153                                 (use_tagstack
154 ***************
155 *** 962,968 ****
156                 ++tagstackidx;
157             }
158   #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
159 !           else if (g_do_tagpreview)
160             {
161                 ptag_entry.cur_match = cur_match;
162                 ptag_entry.cur_fnum = cur_fnum;
163 --- 962,968 ----
164                 ++tagstackidx;
165             }
166   #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
167 !           else if (g_do_tagpreview != 0)
168             {
169                 ptag_entry.cur_match = cur_match;
170                 ptag_entry.cur_fnum = cur_fnum;
171 ***************
172 *** 3110,3116 ****
173   #endif
174   
175   #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
176 !     if (g_do_tagpreview)
177       {
178         postponed_split = 0;    /* don't split again below */
179         curwin_save = curwin;   /* Save current window */
180 --- 3110,3116 ----
181   #endif
182   
183   #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
184 !     if (g_do_tagpreview != 0)
185       {
186         postponed_split = 0;    /* don't split again below */
187         curwin_save = curwin;   /* Save current window */
188 ***************
189 *** 3148,3154 ****
190         /* A :ta from a help file will keep the b_help flag set.  For ":ptag"
191          * we need to use the flag from the window where we came from. */
192   #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
193 !       if (g_do_tagpreview)
194             keep_help_flag = curwin_save->w_buffer->b_help;
195         else
196   #endif
197 --- 3148,3154 ----
198         /* A :ta from a help file will keep the b_help flag set.  For ":ptag"
199          * we need to use the flag from the window where we came from. */
200   #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
201 !       if (g_do_tagpreview != 0)
202             keep_help_flag = curwin_save->w_buffer->b_help;
203         else
204   #endif
205 ***************
206 *** 3322,3328 ****
207         }
208   
209   #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
210 !       if (g_do_tagpreview && curwin != curwin_save && win_valid(curwin_save))
211         {
212             /* Return cursor to where we were */
213             validate_cursor();
214 --- 3322,3329 ----
215         }
216   
217   #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
218 !       if (g_do_tagpreview != 0
219 !                          && curwin != curwin_save && win_valid(curwin_save))
220         {
221             /* Return cursor to where we were */
222             validate_cursor();
223 *** ../vim-7.3.128/src/version.c        2011-02-25 15:11:17.000000000 +0100
224 --- src/version.c       2011-02-25 15:12:25.000000000 +0100
225 ***************
226 *** 716,717 ****
227 --- 716,719 ----
228   {   /* Add new patch number below this line */
229 + /**/
230 +     129,
231   /**/
232
233 -- 
234 PRINCE:    He's come to rescue me, father.
235 LAUNCELOT: (embarrassed) Well, let's not jump to conclusions ...
236                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
237
238  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
239 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
240 \\\  an exciting new programming language -- http://www.Zimbu.org        ///
241  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
This page took 0.045413 seconds and 3 git commands to generate.