updated for version 7.0107
diff --git a/src/syntax.c b/src/syntax.c
index 6639df0..4ecec9b 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -463,8 +463,6 @@
     int		dist;
     static int	changedtick = 0;	/* remember the last change ID */
 
-    reg_syn = TRUE;	/* let vim_regexec() know we're using syntax */
-
     /*
      * After switching buffers, invalidate current_state.
      * Also do this when a change was made, the current state may be invalid
@@ -483,7 +481,7 @@
      */
     syn_stack_alloc();
     if (syn_buf->b_sst_array == NULL)
-	goto theend;		/* out of memory */
+	return;		/* out of memory */
     syn_buf->b_sst_lasttick = display_tick;
 
     /*
@@ -607,9 +605,6 @@
     }
 
     syn_start_line();
-
-theend:
-    reg_syn = FALSE;
 }
 
 /*
@@ -1604,8 +1599,6 @@
     int		retval = TRUE;
     synstate_T	*sp;
 
-    reg_syn = TRUE;	/* let vim_regexec() know we're using syntax */
-
     /*
      * Check the state stack when:
      * - lnum is just below the previously syntaxed line.
@@ -1639,8 +1632,6 @@
 	}
     }
 
-    reg_syn = FALSE;
-
     return retval;
 }
 
@@ -1707,8 +1698,6 @@
     if (syn_buf->b_sst_array == NULL)
 	return 0;
 
-    reg_syn = TRUE;	/* let vim_regexec() know we're using syntax */
-
     /* Make sure current_state is valid */
     if (INVALID_STATE(&current_state))
 	validate_current_state();
@@ -1722,7 +1711,6 @@
 	++current_col;
     }
 
-    reg_syn = FALSE;
     return attr;
 }
 
@@ -2999,7 +2987,7 @@
 }
 
 /*
- * Call vim_regexec() to match in syn_buf.
+ * Call vim_regexec() to find a match with "rmp" in "syn_buf".
  * Returns TRUE when there is a match.
  */
     static int
@@ -3008,6 +2996,7 @@
     linenr_T	lnum;
     colnr_T	col;
 {
+    rmp->rmm_maxcol = syn_buf->b_p_smc;
     if (vim_regexec_multi(rmp, syn_win, syn_buf, lnum, col) > 0)
     {
 	rmp->startpos[0].lnum += lnum;