Patch 8.0.0481
Problem:    Unnecessary if statement.
Solution:   Remove the statement.  Fix "it's" vs "its" mistakes. (Dominique
            Pelle, closes #1568)
Files:      src/syntax.c


*** ../vim-8.0.0480/src/syntax.c        2017-03-16 17:23:26.835815782 +0100
--- src/syntax.c        2017-03-18 21:35:17.182207503 +0100
***************
*** 1782,1817 ****
      stateitem_T       *cur_si;
      colnr_T   prev_current_col;
  
!     if (!current_finished)
      {
!       while (!current_finished)
        {
-           (void)syn_current_attr(syncing, FALSE, NULL, FALSE);
            /*
!            * When syncing, and found some item, need to check the item.
             */
!           if (syncing && current_state.ga_len)
!           {
!               /*
!                * Check for match with sync item.
!                */
!               cur_si = &CUR_STATE(current_state.ga_len - 1);
!               if (cur_si->si_idx >= 0
!                       && (SYN_ITEMS(syn_block)[cur_si->si_idx].sp_flags
!                                             & (HL_SYNC_HERE|HL_SYNC_THERE)))
!                   return TRUE;
! 
!               /* syn_current_attr() will have skipped the check for an item
!                * that ends here, need to do that now.  Be careful not to go
!                * past the NUL. */
!               prev_current_col = current_col;
!               if (syn_getcurline()[current_col] != NUL)
!                   ++current_col;
!               check_state_ends();
!               current_col = prev_current_col;
!           }
!           ++current_col;
        }
      }
      return FALSE;
  }
--- 1782,1814 ----
      stateitem_T       *cur_si;
      colnr_T   prev_current_col;
  
!     while (!current_finished)
      {
!       (void)syn_current_attr(syncing, FALSE, NULL, FALSE);
!       /*
!        * When syncing, and found some item, need to check the item.
!        */
!       if (syncing && current_state.ga_len)
        {
            /*
!            * Check for match with sync item.
             */
!           cur_si = &CUR_STATE(current_state.ga_len - 1);
!           if (cur_si->si_idx >= 0
!                   && (SYN_ITEMS(syn_block)[cur_si->si_idx].sp_flags
!                                         & (HL_SYNC_HERE|HL_SYNC_THERE)))
!               return TRUE;
! 
!           /* syn_current_attr() will have skipped the check for an item
!            * that ends here, need to do that now.  Be careful not to go
!            * past the NUL. */
!           prev_current_col = current_col;
!           if (syn_getcurline()[current_col] != NUL)
!               ++current_col;
!           check_state_ends();
!           current_col = prev_current_col;
        }
+       ++current_col;
      }
      return FALSE;
  }
***************
*** 3333,3339 ****
  /*
   * Check one position in a line for a matching keyword.
   * The caller must check if a keyword can start at startcol.
!  * Return it's ID if found, 0 otherwise.
   */
      static int
  check_keyword_id(
--- 3330,3336 ----
  /*
   * Check one position in a line for a matching keyword.
   * The caller must check if a keyword can start at startcol.
!  * Return its ID if found, 0 otherwise.
   */
      static int
  check_keyword_id(
***************
*** 5495,5501 ****
  }
  
  /*
!  * Lookup a syntax cluster name and return it's ID.
   * If it is not found, 0 is returned.
   */
      static int
--- 5492,5498 ----
  }
  
  /*
!  * Lookup a syntax cluster name and return its ID.
   * If it is not found, 0 is returned.
   */
      static int
***************
*** 5535,5541 ****
  }
  
  /*
!  * Find syntax cluster name in the table and return it's ID.
   * The argument is a pointer to the name and the length of the name.
   * If it doesn't exist yet, a new entry is created.
   * Return 0 for failure.
--- 5532,5538 ----
  }
  
  /*
!  * Find syntax cluster name in the table and return its ID.
   * The argument is a pointer to the name and the length of the name.
   * If it doesn't exist yet, a new entry is created.
   * Return 0 for failure.
***************
*** 5559,5565 ****
  }
  
  /*
!  * Add new syntax cluster and return it's ID.
   * "name" must be an allocated string, it will be consumed.
   * Return 0 for failure.
   */
--- 5556,5562 ----
  }
  
  /*
!  * Add new syntax cluster and return its ID.
   * "name" must be an allocated string, it will be consumed.
   * Return 0 for failure.
   */
***************
*** 7752,7758 ****
                    break;
                }
  
!               /* Use the _16 table to check if its a valid color name. */
                color = color_numbers_16[i];
                if (color >= 0)
                {
--- 7749,7755 ----
                    break;
                }
  
!               /* Use the _16 table to check if it's a valid color name. */
                color = color_numbers_16[i];
                if (color >= 0)
                {
***************
*** 9346,9352 ****
  }
  
  /*
!  * Lookup a highlight group name and return it's ID.
   * If it is not found, 0 is returned.
   */
      int
--- 9343,9349 ----
  }
  
  /*
!  * Lookup a highlight group name and return its ID.
   * If it is not found, 0 is returned.
   */
      int
***************
*** 9411,9417 ****
  }
  
  /*
!  * Find highlight group name in the table and return it's ID.
   * The argument is a pointer to the name and the length of the name.
   * If it doesn't exist yet, a new entry is created.
   * Return 0 for failure.
--- 9408,9414 ----
  }
  
  /*
!  * Find highlight group name in the table and return its ID.
   * The argument is a pointer to the name and the length of the name.
   * If it doesn't exist yet, a new entry is created.
   * Return 0 for failure.
***************
*** 9435,9441 ****
  }
  
  /*
!  * Add new highlight group and return it's ID.
   * "name" must be an allocated string, it will be consumed.
   * Return 0 for failure.
   */
--- 9432,9438 ----
  }
  
  /*
!  * Add new highlight group and return its ID.
   * "name" must be an allocated string, it will be consumed.
   * Return 0 for failure.
   */
*** ../vim-8.0.0480/src/version.c       2017-03-18 21:22:42.503765361 +0100
--- src/version.c       2017-03-18 21:36:49.201529374 +0100
***************
*** 766,767 ****
--- 766,769 ----
  {   /* Add new patch number below this line */
+ /**/
+     481,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
154. You fondle your mouse.

 /// 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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui