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