0
0
mirror of https://github.com/vim/vim.git synced 2025-07-25 10:54:51 -04:00

updated for version 7.3.129

Problem:    Using integer like a boolean.
Solution:   Nicer check for integer being non-zero.
This commit is contained in:
Bram Moolenaar 2011-02-25 15:13:48 +01:00
parent e698addf88
commit 128773b21d
2 changed files with 15 additions and 12 deletions

View File

@ -204,7 +204,7 @@ do_tag(tag, type, count, forceit, verbose)
else else
{ {
#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
if (g_do_tagpreview) if (g_do_tagpreview != 0)
use_tagstack = FALSE; use_tagstack = FALSE;
else else
#endif #endif
@ -222,7 +222,7 @@ do_tag(tag, type, count, forceit, verbose)
)) ))
{ {
#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
if (g_do_tagpreview) if (g_do_tagpreview != 0)
{ {
if (ptag_entry.tagname != NULL if (ptag_entry.tagname != NULL
&& STRCMP(ptag_entry.tagname, tag) == 0) && STRCMP(ptag_entry.tagname, tag) == 0)
@ -278,7 +278,7 @@ do_tag(tag, type, count, forceit, verbose)
{ {
if ( if (
#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
g_do_tagpreview ? ptag_entry.tagname == NULL : g_do_tagpreview != 0 ? ptag_entry.tagname == NULL :
#endif #endif
tagstacklen == 0) tagstacklen == 0)
{ {
@ -361,7 +361,7 @@ do_tag(tag, type, count, forceit, verbose)
) )
{ {
#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
if (g_do_tagpreview) if (g_do_tagpreview != 0)
{ {
cur_match = ptag_entry.cur_match; cur_match = ptag_entry.cur_match;
cur_fnum = ptag_entry.cur_fnum; cur_fnum = ptag_entry.cur_fnum;
@ -399,7 +399,7 @@ do_tag(tag, type, count, forceit, verbose)
prevtagstackidx = tagstackidx; prevtagstackidx = tagstackidx;
#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
if (g_do_tagpreview) if (g_do_tagpreview != 0)
{ {
cur_match = ptag_entry.cur_match; cur_match = ptag_entry.cur_match;
cur_fnum = ptag_entry.cur_fnum; cur_fnum = ptag_entry.cur_fnum;
@ -437,7 +437,7 @@ do_tag(tag, type, count, forceit, verbose)
} }
#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
if (g_do_tagpreview) if (g_do_tagpreview != 0)
{ {
if (type != DT_SELECT && type != DT_JUMP) if (type != DT_SELECT && type != DT_JUMP)
{ {
@ -492,7 +492,7 @@ do_tag(tag, type, count, forceit, verbose)
if (use_tagstack) if (use_tagstack)
name = tagstack[tagstackidx].tagname; name = tagstack[tagstackidx].tagname;
#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
else if (g_do_tagpreview) else if (g_do_tagpreview != 0)
name = ptag_entry.tagname; name = ptag_entry.tagname;
#endif #endif
else else
@ -620,7 +620,7 @@ do_tag(tag, type, count, forceit, verbose)
parse_match(matches[i], &tagp); parse_match(matches[i], &tagp);
if (!new_tag && ( if (!new_tag && (
#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
(g_do_tagpreview (g_do_tagpreview != 0
&& i == ptag_entry.cur_match) || && i == ptag_entry.cur_match) ||
#endif #endif
(use_tagstack (use_tagstack
@ -962,7 +962,7 @@ do_tag(tag, type, count, forceit, verbose)
++tagstackidx; ++tagstackidx;
} }
#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
else if (g_do_tagpreview) else if (g_do_tagpreview != 0)
{ {
ptag_entry.cur_match = cur_match; ptag_entry.cur_match = cur_match;
ptag_entry.cur_fnum = cur_fnum; ptag_entry.cur_fnum = cur_fnum;
@ -3110,7 +3110,7 @@ jumpto_tag(lbuf, forceit, keep_help)
#endif #endif
#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
if (g_do_tagpreview) if (g_do_tagpreview != 0)
{ {
postponed_split = 0; /* don't split again below */ postponed_split = 0; /* don't split again below */
curwin_save = curwin; /* Save current window */ curwin_save = curwin; /* Save current window */
@ -3148,7 +3148,7 @@ jumpto_tag(lbuf, forceit, keep_help)
/* A :ta from a help file will keep the b_help flag set. For ":ptag" /* 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. */ * we need to use the flag from the window where we came from. */
#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
if (g_do_tagpreview) if (g_do_tagpreview != 0)
keep_help_flag = curwin_save->w_buffer->b_help; keep_help_flag = curwin_save->w_buffer->b_help;
else else
#endif #endif
@ -3322,7 +3322,8 @@ jumpto_tag(lbuf, forceit, keep_help)
} }
#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
if (g_do_tagpreview && curwin != curwin_save && win_valid(curwin_save)) if (g_do_tagpreview != 0
&& curwin != curwin_save && win_valid(curwin_save))
{ {
/* Return cursor to where we were */ /* Return cursor to where we were */
validate_cursor(); validate_cursor();

View File

@ -714,6 +714,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
129,
/**/ /**/
128, 128,
/**/ /**/