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 -- [email protected] -- 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    ///

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui