Karsten Hopp 51175f
To: vim_dev@googlegroups.com
Karsten Hopp 51175f
Subject: Patch 7.3.205
Karsten Hopp 51175f
Fcc: outbox
Karsten Hopp 51175f
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 51175f
Mime-Version: 1.0
Karsten Hopp 51175f
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 51175f
Content-Transfer-Encoding: 8bit
Karsten Hopp 51175f
------------
Karsten Hopp 51175f
Karsten Hopp 51175f
Patch 7.3.205
Karsten Hopp 51175f
Problem:    Syntax "extend" doesn't work correctly.
Karsten Hopp 51175f
Solution:   Avoid calling check_state_ends() recursively (Ben Schmidt)
Karsten Hopp 51175f
Files:	    src/syntax.c
Karsten Hopp 51175f
Karsten Hopp 51175f
Karsten Hopp 51175f
*** ../mercurial/vim73/src/syntax.c	2011-05-19 12:14:03.000000000 +0200
Karsten Hopp 51175f
--- src/syntax.c	2011-05-25 17:47:46.000000000 +0200
Karsten Hopp 51175f
***************
Karsten Hopp 51175f
*** 990,996 ****
Karsten Hopp 51175f
--- 990,999 ----
Karsten Hopp 51175f
       * previous line and regions that have "keepend".
Karsten Hopp 51175f
       */
Karsten Hopp 51175f
      if (current_state.ga_len > 0)
Karsten Hopp 51175f
+     {
Karsten Hopp 51175f
  	syn_update_ends(TRUE);
Karsten Hopp 51175f
+ 	check_state_ends();
Karsten Hopp 51175f
+     }
Karsten Hopp 51175f
  
Karsten Hopp 51175f
      next_match_idx = -1;
Karsten Hopp 51175f
      ++current_line_id;
Karsten Hopp 51175f
***************
Karsten Hopp 51175f
*** 1064,1070 ****
Karsten Hopp 51175f
  	}
Karsten Hopp 51175f
      }
Karsten Hopp 51175f
      check_keepend();
Karsten Hopp 51175f
-     check_state_ends();
Karsten Hopp 51175f
  }
Karsten Hopp 51175f
  
Karsten Hopp 51175f
  /****************************************
Karsten Hopp 51175f
--- 1067,1072 ----
Karsten Hopp 51175f
***************
Karsten Hopp 51175f
*** 2533,2539 ****
Karsten Hopp 51175f
  check_state_ends()
Karsten Hopp 51175f
  {
Karsten Hopp 51175f
      stateitem_T	*cur_si;
Karsten Hopp 51175f
!     int		had_extend = FALSE;
Karsten Hopp 51175f
  
Karsten Hopp 51175f
      cur_si = &CUR_STATE(current_state.ga_len - 1);
Karsten Hopp 51175f
      for (;;)
Karsten Hopp 51175f
--- 2535,2541 ----
Karsten Hopp 51175f
  check_state_ends()
Karsten Hopp 51175f
  {
Karsten Hopp 51175f
      stateitem_T	*cur_si;
Karsten Hopp 51175f
!     int		had_extend;
Karsten Hopp 51175f
  
Karsten Hopp 51175f
      cur_si = &CUR_STATE(current_state.ga_len - 1);
Karsten Hopp 51175f
      for (;;)
Karsten Hopp 51175f
***************
Karsten Hopp 51175f
*** 2586,2593 ****
Karsten Hopp 51175f
  
Karsten Hopp 51175f
  		/* When the ended item has "extend", another item with
Karsten Hopp 51175f
  		 * "keepend" now needs to check for its end. */
Karsten Hopp 51175f
! 		 if (cur_si->si_flags & HL_EXTEND)
Karsten Hopp 51175f
! 		     had_extend = TRUE;
Karsten Hopp 51175f
  
Karsten Hopp 51175f
  		pop_current_state();
Karsten Hopp 51175f
  
Karsten Hopp 51175f
--- 2588,2594 ----
Karsten Hopp 51175f
  
Karsten Hopp 51175f
  		/* When the ended item has "extend", another item with
Karsten Hopp 51175f
  		 * "keepend" now needs to check for its end. */
Karsten Hopp 51175f
! 		 had_extend = (cur_si->si_flags & HL_EXTEND);
Karsten Hopp 51175f
  
Karsten Hopp 51175f
  		pop_current_state();
Karsten Hopp 51175f
  
Karsten Hopp 51175f
*** ../vim-7.3.204/src/version.c	2011-05-25 17:29:40.000000000 +0200
Karsten Hopp 51175f
--- src/version.c	2011-05-25 17:52:57.000000000 +0200
Karsten Hopp 51175f
***************
Karsten Hopp 51175f
*** 711,712 ****
Karsten Hopp 51175f
--- 711,714 ----
Karsten Hopp 51175f
  {   /* Add new patch number below this line */
Karsten Hopp 51175f
+ /**/
Karsten Hopp 51175f
+     205,
Karsten Hopp 51175f
  /**/
Karsten Hopp 51175f
Karsten Hopp 51175f
-- 
Karsten Hopp 51175f
hundred-and-one symptoms of being an internet addict:
Karsten Hopp 51175f
110. You actually volunteer to become your employer's webmaster.
Karsten Hopp 51175f
Karsten Hopp 51175f
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 51175f
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 51175f
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 51175f
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///