| 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 |
| |
| |
| |
| |
| |
| *** 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(); |
| |
| |
| |
| *** 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 /// |