073263
To: vim_dev@googlegroups.com
073263
Subject: Patch 7.4.355
073263
Fcc: outbox
073263
From: Bram Moolenaar <Bram@moolenaar.net>
073263
Mime-Version: 1.0
073263
Content-Type: text/plain; charset=UTF-8
073263
Content-Transfer-Encoding: 8bit
073263
------------
073263
073263
Patch 7.4.355
073263
Problem:    Several problems with Javascript indenting.
073263
Solution:   Improve Javascript indenting.
073263
Files:	    src/misc1.c
073263
073263
073263
*** ../vim-7.4.354/src/misc1.c	2014-07-02 18:27:44.662290695 +0200
073263
--- src/misc1.c	2014-07-03 22:42:20.315848662 +0200
073263
***************
073263
*** 5382,5387 ****
073263
--- 5382,5388 ----
073263
  static char_u	*cin_skipcomment __ARGS((char_u *));
073263
  static int	cin_nocode __ARGS((char_u *));
073263
  static pos_T	*find_line_comment __ARGS((void));
073263
+ static int	cin_has_js_key __ARGS((char_u *text));
073263
  static int	cin_islabel_skip __ARGS((char_u **));
073263
  static int	cin_isdefault __ARGS((char_u *));
073263
  static char_u	*after_label __ARGS((char_u *l));
073263
***************
073263
*** 5410,5415 ****
073263
--- 5411,5417 ----
073263
  static int	cin_skip2pos __ARGS((pos_T *trypos));
073263
  static pos_T	*find_start_brace __ARGS((void));
073263
  static pos_T	*find_match_paren __ARGS((int));
073263
+ static pos_T	*find_match_char __ARGS((int c, int ind_maxparen));
073263
  static int	corr_ind_maxparen __ARGS((pos_T *startpos));
073263
  static int	find_last_paren __ARGS((char_u *l, int start, int end));
073263
  static int	find_match __ARGS((int lookfor, linenr_T ourscope));
073263
***************
073263
*** 5494,5500 ****
073263
--- 5496,5533 ----
073263
  }
073263
  
073263
  /*
073263
+  * Return TRUE if "text" starts with "key:".
073263
+  */
073263
+     static int
073263
+ cin_has_js_key(text)
073263
+     char_u *text;
073263
+ {
073263
+     char_u *s = skipwhite(text);
073263
+     int	    quote = 0;
073263
+ 
073263
+     if (*s == '\'' || *s == '"')
073263
+     {
073263
+ 	/* can be 'key': or "key": */
073263
+ 	quote = *s;
073263
+ 	++s;
073263
+     }
073263
+     if (!vim_isIDc(*s))	    /* need at least one ID character */
073263
+ 	return FALSE;
073263
+ 
073263
+     while (vim_isIDc(*s))
073263
+ 	++s;
073263
+     if (*s == quote)
073263
+ 	++s;
073263
+ 
073263
+     s = cin_skipcomment(s);
073263
+ 
073263
+     /* "::" is not a label, it's C++ */
073263
+     return (*s == ':' && s[1] != ':');
073263
+ }
073263
+ 
073263
+ /*
073263
   * Check if string matches "label:"; move to character after ':' if true.
073263
+  * "*s" must point to the start of the label, if there is one.
073263
   */
073263
      static int
073263
  cin_islabel_skip(s)
073263
***************
073263
*** 6621,6632 ****
073263
  find_match_paren(ind_maxparen)	    /* XXX */
073263
      int		ind_maxparen;
073263
  {
073263
      pos_T	cursor_save;
073263
      pos_T	*trypos;
073263
      static pos_T pos_copy;
073263
  
073263
      cursor_save = curwin->w_cursor;
073263
!     if ((trypos = findmatchlimit(NULL, '(', 0, ind_maxparen)) != NULL)
073263
      {
073263
  	/* check if the ( is in a // comment */
073263
  	if ((colnr_T)cin_skip2pos(trypos) > trypos->col)
073263
--- 6654,6673 ----
073263
  find_match_paren(ind_maxparen)	    /* XXX */
073263
      int		ind_maxparen;
073263
  {
073263
+     return find_match_char('(', ind_maxparen);
073263
+ }
073263
+ 
073263
+     static pos_T *
073263
+ find_match_char(c, ind_maxparen)	    /* XXX */
073263
+     int		c;
073263
+     int		ind_maxparen;
073263
+ {
073263
      pos_T	cursor_save;
073263
      pos_T	*trypos;
073263
      static pos_T pos_copy;
073263
  
073263
      cursor_save = curwin->w_cursor;
073263
!     if ((trypos = findmatchlimit(NULL, c, 0, ind_maxparen)) != NULL)
073263
      {
073263
  	/* check if the ( is in a // comment */
073263
  	if ((colnr_T)cin_skip2pos(trypos) > trypos->col)
073263
***************
073263
*** 6976,6981 ****
073263
--- 7017,7024 ----
073263
  #define LOOKFOR_NOBREAK		8
073263
  #define LOOKFOR_CPP_BASECLASS	9
073263
  #define LOOKFOR_ENUM_OR_INIT	10
073263
+ #define LOOKFOR_JS_KEY		11
073263
+ #define LOOKFOR_NO_COMMA	12
073263
  
073263
      int		whilelevel;
073263
      linenr_T	lnum;
073263
***************
073263
*** 6986,6991 ****
073263
--- 7029,7035 ----
073263
      int		cont_amount = 0;    /* amount for continuation line */
073263
      int		original_line_islabel;
073263
      int		added_to_amount = 0;
073263
+     int		js_cur_has_key = 0;
073263
  
073263
      /* make a copy, value is changed below */
073263
      int		ind_continuation = curbuf->b_ind_continuation;
073263
***************
073263
*** 7209,7214 ****
073263
--- 7253,7268 ----
073263
      }
073263
  
073263
      /*
073263
+      * Are we looking at a ']' that has a match?
073263
+      */
073263
+     else if (*skipwhite(theline) == ']'
073263
+ 	    && (trypos = find_match_char('[', curbuf->b_ind_maxparen)) != NULL)
073263
+     {
073263
+ 	/* align with the line containing the '['. */
073263
+ 	amount = get_indent_lnum(trypos->lnum);
073263
+     }
073263
+ 
073263
+     /*
073263
       * Are we inside parentheses or braces?
073263
       */						    /* XXX */
073263
      else if (((trypos = find_match_paren(curbuf->b_ind_maxparen)) != NULL
073263
***************
073263
*** 7473,7486 ****
073263
  	if (cin_iscomment(theline))
073263
  	    amount += curbuf->b_ind_comment;
073263
        }
073263
- 
073263
-       /*
073263
-        * Are we at least inside braces, then?
073263
-        */
073263
        else
073263
        {
073263
  	trypos = tryposBrace;
073263
- 
073263
  	ourscope = trypos->lnum;
073263
  	start = ml_get(ourscope);
073263
  
073263
--- 7527,7539 ----
073263
  	if (cin_iscomment(theline))
073263
  	    amount += curbuf->b_ind_comment;
073263
        }
073263
        else
073263
        {
073263
+ 	/*
073263
+ 	 * We are inside braces, there is a { before this line at the position
073263
+ 	 * stored in tryposBrace.
073263
+ 	 */
073263
  	trypos = tryposBrace;
073263
  	ourscope = trypos->lnum;
073263
  	start = ml_get(ourscope);
073263
  
073263
***************
073263
*** 7502,7525 ****
073263
  	}
073263
  	else
073263
  	{
073263
! 	    /*
073263
! 	     * that opening brace might have been on a continuation
073263
! 	     * line.  if so, find the start of the line.
073263
! 	     */
073263
  	    curwin->w_cursor.lnum = ourscope;
073263
  
073263
! 	    /*
073263
! 	     * position the cursor over the rightmost paren, so that
073263
! 	     * matching it will take us back to the start of the line.
073263
! 	     */
073263
  	    lnum = ourscope;
073263
  	    if (find_last_paren(start, '(', ')')
073263
  			&& (trypos = find_match_paren(curbuf->b_ind_maxparen))
073263
  								      != NULL)
073263
  		lnum = trypos->lnum;
073263
  
073263
! 	    /*
073263
! 	     * It could have been something like
073263
  	     *	   case 1: if (asdf &&
073263
  	     *			ldfd) {
073263
  	     *		    }
073263
--- 7555,7573 ----
073263
  	}
073263
  	else
073263
  	{
073263
! 	    /* That opening brace might have been on a continuation
073263
! 	     * line.  if so, find the start of the line. */
073263
  	    curwin->w_cursor.lnum = ourscope;
073263
  
073263
! 	    /* Position the cursor over the rightmost paren, so that
073263
! 	     * matching it will take us back to the start of the line. */
073263
  	    lnum = ourscope;
073263
  	    if (find_last_paren(start, '(', ')')
073263
  			&& (trypos = find_match_paren(curbuf->b_ind_maxparen))
073263
  								      != NULL)
073263
  		lnum = trypos->lnum;
073263
  
073263
! 	    /* It could have been something like
073263
  	     *	   case 1: if (asdf &&
073263
  	     *			ldfd) {
073263
  	     *		    }
073263
***************
073263
*** 7535,7542 ****
073263
  	    start_brace = BRACE_AT_END;
073263
  	}
073263
  
073263
  	/*
073263
! 	 * if we're looking at a closing brace, that's where
073263
  	 * we want to be.  otherwise, add the amount of room
073263
  	 * that an indent is supposed to be.
073263
  	 */
073263
--- 7583,7594 ----
073263
  	    start_brace = BRACE_AT_END;
073263
  	}
073263
  
073263
+ 	/* For Javascript check if the line starts with "key:". */
073263
+ 	if (curbuf->b_ind_js)
073263
+ 	    js_cur_has_key = cin_has_js_key(theline);
073263
+ 
073263
  	/*
073263
! 	 * If we're looking at a closing brace, that's where
073263
  	 * we want to be.  otherwise, add the amount of room
073263
  	 * that an indent is supposed to be.
073263
  	 */
073263
***************
073263
*** 7643,7649 ****
073263
  	     * Search backwards.  If we find something we recognize, line up
073263
  	     * with that.
073263
  	     *
073263
! 	     * if we're looking at an open brace, indent
073263
  	     * the usual amount relative to the conditional
073263
  	     * that opens the block.
073263
  	     */
073263
--- 7695,7701 ----
073263
  	     * Search backwards.  If we find something we recognize, line up
073263
  	     * with that.
073263
  	     *
073263
! 	     * If we're looking at an open brace, indent
073263
  	     * the usual amount relative to the conditional
073263
  	     * that opens the block.
073263
  	     */
073263
***************
073263
*** 8051,8056 ****
073263
--- 8103,8143 ----
073263
  		 */
073263
  		terminated = cin_isterminated(l, FALSE, TRUE);
073263
  
073263
+ 		if (js_cur_has_key)
073263
+ 		{
073263
+ 		    js_cur_has_key = 0; /* only check the first line */
073263
+ 		    if (curbuf->b_ind_js && terminated == ',')
073263
+ 		    {
073263
+ 			/* For Javascript we might be inside an object:
073263
+ 			 *   key: something,  <- align with this
073263
+ 			 *   key: something
073263
+ 			 * or:
073263
+ 			 *   key: something +  <- align with this
073263
+ 			 *       something,
073263
+ 			 *   key: something
073263
+ 			 */
073263
+ 			lookfor = LOOKFOR_JS_KEY;
073263
+ 		    }
073263
+ 		}
073263
+ 		if (lookfor == LOOKFOR_JS_KEY && cin_has_js_key(l))
073263
+ 		{
073263
+ 		    amount = get_indent();
073263
+ 		    break;
073263
+ 		}
073263
+ 		if (lookfor == LOOKFOR_NO_COMMA)
073263
+ 		{
073263
+ 		    if (terminated != ',')
073263
+ 			/* line below current line is the one that starts a
073263
+ 			 * (possibly broken) line ending in a comma. */
073263
+ 			break;
073263
+ 		    amount = get_indent();
073263
+ 		    if (curwin->w_cursor.lnum - 1 == ourscope)
073263
+ 			/* line above is start of the scope, thus current line
073263
+ 			 * is the one that stars a (possibly broken) line
073263
+ 			 * ending in a comma. */
073263
+ 			break;
073263
+ 		}
073263
+ 
073263
  		if (terminated == 0 || (lookfor != LOOKFOR_UNTERM
073263
  							&& terminated == ','))
073263
  		{
073263
***************
073263
*** 8062,8072 ****
073263
  		     *		    bar )
073263
  		     */
073263
  		    /*
073263
! 		     * position the cursor over the rightmost paren, so that
073263
  		     * matching it will take us back to the start of the line.
073263
  		     */
073263
  		    (void)find_last_paren(l, '(', ')');
073263
  		    trypos = find_match_paren(corr_ind_maxparen(&cur_curpos));
073263
  
073263
  		    /*
073263
  		     * If we are looking for ',', we also look for matching
073263
--- 8149,8164 ----
073263
  		     *		    bar )
073263
  		     */
073263
  		    /*
073263
! 		     * Position the cursor over the rightmost paren, so that
073263
  		     * matching it will take us back to the start of the line.
073263
+ 		     * Ignore a match before the start of the block.
073263
  		     */
073263
  		    (void)find_last_paren(l, '(', ')');
073263
  		    trypos = find_match_paren(corr_ind_maxparen(&cur_curpos));
073263
+ 		    if (trypos != NULL && (trypos->lnum < tryposBrace->lnum
073263
+ 				|| (trypos->lnum == tryposBrace->lnum
073263
+ 				    && trypos->col < tryposBrace->col)))
073263
+ 			trypos = NULL;
073263
  
073263
  		    /*
073263
  		     * If we are looking for ',', we also look for matching
073263
***************
073263
*** 8117,8126 ****
073263
  		     * Get indent and pointer to text for current line,
073263
  		     * ignoring any jump label.	    XXX
073263
  		     */
073263
! 		    if (!curbuf->b_ind_js)
073263
! 			cur_amount = skip_label(curwin->w_cursor.lnum, &l);
073263
! 		    else
073263
  			cur_amount = get_indent();
073263
  		    /*
073263
  		     * If this is just above the line we are indenting, and it
073263
  		     * starts with a '{', line it up with this line.
073263
--- 8209,8218 ----
073263
  		     * Get indent and pointer to text for current line,
073263
  		     * ignoring any jump label.	    XXX
073263
  		     */
073263
! 		    if (curbuf->b_ind_js)
073263
  			cur_amount = get_indent();
073263
+ 		    else
073263
+ 			cur_amount = skip_label(curwin->w_cursor.lnum, &l);
073263
  		    /*
073263
  		     * If this is just above the line we are indenting, and it
073263
  		     * starts with a '{', line it up with this line.
073263
***************
073263
*** 8142,8148 ****
073263
  			if (*skipwhite(l) != '{')
073263
  			    amount += curbuf->b_ind_open_extra;
073263
  
073263
! 			if (curbuf->b_ind_cpp_baseclass)
073263
  			{
073263
  			    /* have to look back, whether it is a cpp base
073263
  			     * class declaration or initialization */
073263
--- 8234,8240 ----
073263
  			if (*skipwhite(l) != '{')
073263
  			    amount += curbuf->b_ind_open_extra;
073263
  
073263
! 			if (curbuf->b_ind_cpp_baseclass && !curbuf->b_ind_js)
073263
  			{
073263
  			    /* have to look back, whether it is a cpp base
073263
  			     * class declaration or initialization */
073263
***************
073263
*** 8302,8309 ****
073263
  			     */
073263
  			    if (lookfor == LOOKFOR_INITIAL && terminated == ',')
073263
  			    {
073263
! 				lookfor = LOOKFOR_ENUM_OR_INIT;
073263
! 				cont_amount = cin_first_id_amount();
073263
  			    }
073263
  			    else
073263
  			    {
073263
--- 8394,8434 ----
073263
  			     */
073263
  			    if (lookfor == LOOKFOR_INITIAL && terminated == ',')
073263
  			    {
073263
! 				if (curbuf->b_ind_js)
073263
! 				{
073263
! 				    /* Search for a line ending in a comma
073263
! 				     * and line up with the line below it
073263
! 				     * (could be the current line).
073263
! 				     * some = [
073263
! 				     *     1,     <- line up here
073263
! 				     *     2,
073263
! 				     * some = [
073263
! 				     *     3 +    <- line up here
073263
! 				     *       4 *
073263
! 				     *        5,
073263
! 				     *     6,
073263
! 				     */
073263
! 				    lookfor = LOOKFOR_NO_COMMA;
073263
! 				    amount = get_indent();	    /* XXX */
073263
! 				    trypos = find_match_char('[',
073263
! 						      curbuf->b_ind_maxparen);
073263
! 				    if (trypos != NULL)
073263
! 				    {
073263
! 					if (trypos->lnum
073263
! 						 == curwin->w_cursor.lnum - 1)
073263
! 					{
073263
! 					    /* Current line is first inside
073263
! 					     * [], line up with it. */
073263
! 					    break;
073263
! 					}
073263
! 					ourscope = trypos->lnum;
073263
! 				    }
073263
! 				}
073263
! 				else
073263
! 				{
073263
! 				    lookfor = LOOKFOR_ENUM_OR_INIT;
073263
! 				    cont_amount = cin_first_id_amount();
073263
! 				}
073263
  			    }
073263
  			    else
073263
  			    {
073263
***************
073263
*** 8313,8319 ****
073263
  								/* XXX */
073263
  				    cont_amount = cin_get_equal_amount(
073263
  						       curwin->w_cursor.lnum);
073263
! 				if (lookfor != LOOKFOR_TERM)
073263
  				    lookfor = LOOKFOR_UNTERM;
073263
  			    }
073263
  			}
073263
--- 8438,8445 ----
073263
  								/* XXX */
073263
  				    cont_amount = cin_get_equal_amount(
073263
  						       curwin->w_cursor.lnum);
073263
! 				if (lookfor != LOOKFOR_TERM
073263
! 						 && lookfor != LOOKFOR_JS_KEY)
073263
  				    lookfor = LOOKFOR_UNTERM;
073263
  			    }
073263
  			}
073263
***************
073263
*** 8324,8331 ****
073263
  		 * Check if we are after a while (cond);
073263
  		 * If so: Ignore until the matching "do".
073263
  		 */
073263
! 							/* XXX */
073263
! 		else if (cin_iswhileofdo_end(terminated))
073263
  		{
073263
  		    /*
073263
  		     * Found an unterminated line after a while ();, line up
073263
--- 8450,8456 ----
073263
  		 * Check if we are after a while (cond);
073263
  		 * If so: Ignore until the matching "do".
073263
  		 */
073263
! 		else if (cin_iswhileofdo_end(terminated)) /* XXX */
073263
  		{
073263
  		    /*
073263
  		     * Found an unterminated line after a while ();, line up
073263
***************
073263
*** 8538,8555 ****
073263
        if (curbuf->b_ind_jump_label > 0 && original_line_islabel)
073263
  	  amount -= curbuf->b_ind_jump_label;
073263
      }
073263
- 
073263
-     /*
073263
-      * ok -- we're not inside any sort of structure at all!
073263
-      *
073263
-      * this means we're at the top level, and everything should
073263
-      * basically just match where the previous line is, except
073263
-      * for the lines immediately following a function declaration,
073263
-      * which are K&R-style parameters and need to be indented.
073263
-      */
073263
      else
073263
      {
073263
  	/*
073263
  	 * if our line starts with an open brace, forget about any
073263
  	 * prevailing indent and make sure it looks like the start
073263
  	 * of a function
073263
--- 8663,8678 ----
073263
        if (curbuf->b_ind_jump_label > 0 && original_line_islabel)
073263
  	  amount -= curbuf->b_ind_jump_label;
073263
      }
073263
      else
073263
      {
073263
  	/*
073263
+ 	 * ok -- we're not inside any sort of structure at all!
073263
+ 	 *
073263
+ 	 * This means we're at the top level, and everything should
073263
+ 	 * basically just match where the previous line is, except
073263
+ 	 * for the lines immediately following a function declaration,
073263
+ 	 * which are K&R-style parameters and need to be indented.
073263
+ 	 *
073263
  	 * if our line starts with an open brace, forget about any
073263
  	 * prevailing indent and make sure it looks like the start
073263
  	 * of a function
073263
***************
073263
*** 8700,8705 ****
073263
--- 8823,8840 ----
073263
  		    break;
073263
  
073263
  		/*
073263
+ 		 * If the previous line ends on '[' we are probably in an
073263
+ 		 * array constant:
073263
+ 		 * something = [
073263
+ 		 *     234,  <- extra indent
073263
+ 		 */
073263
+ 		if (cin_ends_in(l, (char_u *)"[", NULL))
073263
+ 		{
073263
+ 		    amount = get_indent() + ind_continuation;
073263
+ 		    break;
073263
+ 		}
073263
+ 
073263
+ 		/*
073263
  		 * Find a line only has a semicolon that belongs to a previous
073263
  		 * line ending in '}', e.g. before an #endif.  Don't increase
073263
  		 * indent then.
073263
*** ../vim-7.4.354/src/testdir/test3.in	2014-07-02 18:27:44.662290695 +0200
073263
--- src/testdir/test3.in	2014-07-03 22:41:38.743848025 +0200
073263
***************
073263
*** 1432,1438 ****
073263
  
073263
  STARTTEST
073263
  :set cino=(0,ts
073263
! 2kdd=][
073263
  ENDTEST
073263
  
073263
  void func(int a
073263
--- 1432,1438 ----
073263
  
073263
  STARTTEST
073263
  :set cino=(0,ts
073263
! 2kdd2j=][
073263
  ENDTEST
073263
  
073263
  void func(int a
073263
***************
073263
*** 1446,1452 ****
073263
  
073263
  STARTTEST
073263
  :set cino=(0
073263
! 2kdd=][
073263
  ENDTEST
073263
  
073263
  void
073263
--- 1446,1452 ----
073263
  
073263
  STARTTEST
073263
  :set cino=(0
073263
! 2kdd2j=][
073263
  ENDTEST
073263
  
073263
  void
073263
***************
073263
*** 1461,1467 ****
073263
  
073263
  STARTTEST
073263
  :set cino&
073263
! 2kdd=7][
073263
  ENDTEST
073263
  
073263
  void func(void)
073263
--- 1461,1467 ----
073263
  
073263
  STARTTEST
073263
  :set cino&
073263
! 2kdd2j=7][
073263
  ENDTEST
073263
  
073263
  void func(void)
073263
***************
073263
*** 1538,1544 ****
073263
  STARTTEST
073263
  :set cino&
073263
  :set cino+=l1
073263
! 2kdd=][
073263
  ENDTEST
073263
  
073263
  void func(void)
073263
--- 1538,1544 ----
073263
  STARTTEST
073263
  :set cino&
073263
  :set cino+=l1
073263
! 2kdd2j=][
073263
  ENDTEST
073263
  
073263
  void func(void)
073263
***************
073263
*** 1567,1573 ****
073263
  
073263
  STARTTEST
073263
  :set cino&
073263
! 2kdd=][
073263
  ENDTEST
073263
  
073263
  void func(void)
073263
--- 1567,1573 ----
073263
  
073263
  STARTTEST
073263
  :set cino&
073263
! 2kdd2j=][
073263
  ENDTEST
073263
  
073263
  void func(void)
073263
***************
073263
*** 1592,1598 ****
073263
  
073263
  STARTTEST
073263
  :set cino&
073263
! 2kdd=][
073263
  ENDTEST
073263
  
073263
  void func(void)
073263
--- 1592,1598 ----
073263
  
073263
  STARTTEST
073263
  :set cino&
073263
! 2kdd2j=][
073263
  ENDTEST
073263
  
073263
  void func(void)
073263
***************
073263
*** 1919,1928 ****
073263
  
073263
  JSSTART
073263
  var foo = [
073263
! 1,  // indent 8 more
073263
  2,
073263
  3
073263
! ];  // indent 8 less
073263
  JSEND
073263
  
073263
  STARTTEST
073263
--- 1919,1928 ----
073263
  
073263
  JSSTART
073263
  var foo = [
073263
! 1,
073263
  2,
073263
  3
073263
! ];
073263
  JSEND
073263
  
073263
  STARTTEST
073263
***************
073263
*** 1937,1943 ****
073263
  1,
073263
  2,
073263
  3
073263
! ];  // indent 16 less
073263
  }
073263
  JSEND
073263
  
073263
--- 1937,1943 ----
073263
  1,
073263
  2,
073263
  3
073263
! ];
073263
  }
073263
  JSEND
073263
  
073263
***************
073263
*** 1954,1959 ****
073263
--- 1954,1961 ----
073263
  cond) {
073263
  stmt;
073263
  }
073263
+ window.something.left =
073263
+ (width - 50 + offset) + "px";
073263
  var class_name='myclass';
073263
  
073263
  function private_method() {
073263
***************
073263
*** 1969,1983 ****
073263
  
073263
  $(this).data(class_name+'_public',$.extend({},{
073263
  foo: 'bar',
073263
! bar: 2,  // indent 8 more
073263
! foobar: [  // indent 8 more
073263
! 1,  // indent 8 more
073263
! 2,  // indent 16 more
073263
! 3   // indent 16 more
073263
  ],
073263
! callback: function(){  // indent 8 more
073263
! return true;  // indent 8 more
073263
! }  // indent 8 more
073263
  }, options||{}));
073263
  }
073263
  
073263
--- 1971,1985 ----
073263
  
073263
  $(this).data(class_name+'_public',$.extend({},{
073263
  foo: 'bar',
073263
! bar: 2,
073263
! foobar: [
073263
! 1,
073263
! 2,
073263
! 3
073263
  ],
073263
! callback: function(){
073263
! return true;
073263
! }
073263
  }, options||{}));
073263
  }
073263
  
073263
***************
073263
*** 2018,2026 ****
073263
  foo: 'bar',
073263
  bar: 2,
073263
  foobar: [
073263
! 1,  // indent 8 more
073263
! 2,  // indent 8 more
073263
! 3   // indent 8 more
073263
  ],
073263
  callback: function(){
073263
  return true;
073263
--- 2020,2028 ----
073263
  foo: 'bar',
073263
  bar: 2,
073263
  foobar: [
073263
! 1,
073263
! 2,
073263
! 3
073263
  ],
073263
  callback: function(){
073263
  return true;
073263
***************
073263
*** 2040,2054 ****
073263
  function init(options) {
073263
  $(this).data(class_name+'_public',$.extend({},{
073263
  foo: 'bar',
073263
! bar: 2,  // indent 8 more
073263
! foobar: [  // indent 8 more
073263
! 1,  // indent 8 more
073263
! 2,  // indent 16 more
073263
! 3  // indent 16 more
073263
  ],
073263
! callback: function(){  // indent 8 more
073263
! return true;  // indent 8 more
073263
! }  // indent 8 more
073263
  }, options||{}));
073263
  }
073263
  })(jQuery);
073263
--- 2042,2056 ----
073263
  function init(options) {
073263
  $(this).data(class_name+'_public',$.extend({},{
073263
  foo: 'bar',
073263
! bar: 2,
073263
! foobar: [
073263
! 1,
073263
! 2,
073263
! 3
073263
  ],
073263
! callback: function(){
073263
! return true;
073263
! }
073263
  }, options||{}));
073263
  }
073263
  })(jQuery);
073263
*** ../vim-7.4.354/src/testdir/test3.ok	2014-07-02 18:27:44.662290695 +0200
073263
--- src/testdir/test3.ok	2014-07-03 22:18:58.167827177 +0200
073263
***************
073263
*** 1707,1716 ****
073263
  
073263
  JSSTART
073263
  var foo = [
073263
! 1,  // indent 8 more
073263
  	2,
073263
  	3
073263
! 	];  // indent 8 less
073263
  JSEND
073263
  
073263
  
073263
--- 1707,1716 ----
073263
  
073263
  JSSTART
073263
  var foo = [
073263
! 	1,
073263
  	2,
073263
  	3
073263
! ];
073263
  JSEND
073263
  
073263
  
073263
***************
073263
*** 1720,1726 ****
073263
  		1,
073263
  		2,
073263
  		3
073263
! 			];  // indent 16 less
073263
  }
073263
  JSEND
073263
  
073263
--- 1720,1726 ----
073263
  		1,
073263
  		2,
073263
  		3
073263
! 	];
073263
  }
073263
  JSEND
073263
  
073263
***************
073263
*** 1732,1737 ****
073263
--- 1732,1739 ----
073263
  			cond) {
073263
  		stmt;
073263
  	}
073263
+ 	window.something.left =
073263
+ 		(width - 50 + offset) + "px";
073263
  	var class_name='myclass';
073263
  
073263
  	function private_method() {
073263
***************
073263
*** 1747,1761 ****
073263
  
073263
  		$(this).data(class_name+'_public',$.extend({},{
073263
  			foo: 'bar',
073263
! 		bar: 2,  // indent 8 more
073263
! 		foobar: [  // indent 8 more
073263
! 			1,  // indent 8 more
073263
! 		2,  // indent 16 more
073263
! 		3   // indent 16 more
073263
  			],
073263
! 		callback: function(){  // indent 8 more
073263
! 			return true;  // indent 8 more
073263
! 		}  // indent 8 more
073263
  		}, options||{}));
073263
  	}
073263
  
073263
--- 1749,1763 ----
073263
  
073263
  		$(this).data(class_name+'_public',$.extend({},{
073263
  			foo: 'bar',
073263
! 			bar: 2,
073263
! 			foobar: [
073263
! 				1,
073263
! 				2,
073263
! 				3
073263
  			],
073263
! 			callback: function(){
073263
! 				return true;
073263
! 			}
073263
  		}, options||{}));
073263
  	}
073263
  
073263
***************
073263
*** 1791,1799 ****
073263
  		foo: 'bar',
073263
  		bar: 2,
073263
  		foobar: [
073263
! 		1,  // indent 8 more
073263
! 		2,  // indent 8 more
073263
! 		3   // indent 8 more
073263
  		],
073263
  		callback: function(){
073263
  			return true;
073263
--- 1793,1801 ----
073263
  		foo: 'bar',
073263
  		bar: 2,
073263
  		foobar: [
073263
! 			1,
073263
! 			2,
073263
! 			3
073263
  		],
073263
  		callback: function(){
073263
  			return true;
073263
***************
073263
*** 1808,1822 ****
073263
  	function init(options) {
073263
  		$(this).data(class_name+'_public',$.extend({},{
073263
  			foo: 'bar',
073263
! 		bar: 2,  // indent 8 more
073263
! 		foobar: [  // indent 8 more
073263
! 			1,  // indent 8 more
073263
! 		2,  // indent 16 more
073263
! 		3  // indent 16 more
073263
  			],
073263
! 		callback: function(){  // indent 8 more
073263
! 			return true;  // indent 8 more
073263
! 		}  // indent 8 more
073263
  		}, options||{}));
073263
  	}
073263
  })(jQuery);
073263
--- 1810,1824 ----
073263
  	function init(options) {
073263
  		$(this).data(class_name+'_public',$.extend({},{
073263
  			foo: 'bar',
073263
! 			bar: 2,
073263
! 			foobar: [
073263
! 				1,
073263
! 				2,
073263
! 				3
073263
  			],
073263
! 			callback: function(){
073263
! 				return true;
073263
! 			}
073263
  		}, options||{}));
073263
  	}
073263
  })(jQuery);
073263
*** ../vim-7.4.354/src/version.c	2014-07-03 22:54:04.911859458 +0200
073263
--- src/version.c	2014-07-03 22:54:40.971860011 +0200
073263
***************
073263
*** 736,737 ****
073263
--- 736,739 ----
073263
  {   /* Add new patch number below this line */
073263
+ /**/
073263
+     355,
073263
  /**/
073263
073263
-- 
073263
MESKIMEN'S LAW
073263
    There's never time to do it right, but always time to do it over.
073263
073263
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
073263
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
073263
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
073263
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///