|
Karsten Hopp |
0646d8 |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
0646d8 |
Subject: Patch 7.4.670
|
|
Karsten Hopp |
0646d8 |
Fcc: outbox
|
|
Karsten Hopp |
0646d8 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
0646d8 |
Mime-Version: 1.0
|
|
Karsten Hopp |
0646d8 |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
0646d8 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
0646d8 |
------------
|
|
Karsten Hopp |
0646d8 |
|
|
Karsten Hopp |
0646d8 |
Patch 7.4.670
|
|
Karsten Hopp |
0646d8 |
Problem: Using 'cindent' for Javascript is less than perfect.
|
|
Karsten Hopp |
0646d8 |
Solution: Improve indenting of continuation lines. (Hirohito Higashi)
|
|
Karsten Hopp |
0646d8 |
Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok
|
|
Karsten Hopp |
0646d8 |
|
|
Karsten Hopp |
0646d8 |
|
|
Karsten Hopp |
0646d8 |
*** ../vim-7.4.669/src/misc1.c 2015-03-06 22:00:06.813457075 +0100
|
|
Karsten Hopp |
0646d8 |
--- src/misc1.c 2015-03-20 18:52:24.283668213 +0100
|
|
Karsten Hopp |
0646d8 |
***************
|
|
Karsten Hopp |
0646d8 |
*** 6670,6689 ****
|
|
Karsten Hopp |
0646d8 |
pos_T cursor_save;
|
|
Karsten Hopp |
0646d8 |
pos_T *trypos;
|
|
Karsten Hopp |
0646d8 |
static pos_T pos_copy;
|
|
Karsten Hopp |
0646d8 |
|
|
Karsten Hopp |
0646d8 |
cursor_save = curwin->w_cursor;
|
|
Karsten Hopp |
0646d8 |
! if ((trypos = findmatchlimit(NULL, c, 0, ind_maxparen)) != NULL)
|
|
Karsten Hopp |
0646d8 |
{
|
|
Karsten Hopp |
0646d8 |
/* check if the ( is in a // comment */
|
|
Karsten Hopp |
0646d8 |
if ((colnr_T)cin_skip2pos(trypos) > trypos->col)
|
|
Karsten Hopp |
0646d8 |
trypos = NULL;
|
|
Karsten Hopp |
0646d8 |
else
|
|
Karsten Hopp |
0646d8 |
{
|
|
Karsten Hopp |
0646d8 |
pos_copy = *trypos; /* copy trypos, findmatch will change it */
|
|
Karsten Hopp |
0646d8 |
trypos = &pos_copy;
|
|
Karsten Hopp |
0646d8 |
curwin->w_cursor = *trypos;
|
|
Karsten Hopp |
0646d8 |
! if (ind_find_start_comment() != NULL) /* XXX */
|
|
Karsten Hopp |
0646d8 |
trypos = NULL;
|
|
Karsten Hopp |
0646d8 |
}
|
|
Karsten Hopp |
0646d8 |
}
|
|
Karsten Hopp |
0646d8 |
curwin->w_cursor = cursor_save;
|
|
Karsten Hopp |
0646d8 |
--- 6670,6712 ----
|
|
Karsten Hopp |
0646d8 |
pos_T cursor_save;
|
|
Karsten Hopp |
0646d8 |
pos_T *trypos;
|
|
Karsten Hopp |
0646d8 |
static pos_T pos_copy;
|
|
Karsten Hopp |
0646d8 |
+ int ind_maxp_wk;
|
|
Karsten Hopp |
0646d8 |
|
|
Karsten Hopp |
0646d8 |
cursor_save = curwin->w_cursor;
|
|
Karsten Hopp |
0646d8 |
! ind_maxp_wk = ind_maxparen;
|
|
Karsten Hopp |
0646d8 |
! retry:
|
|
Karsten Hopp |
0646d8 |
! if ((trypos = findmatchlimit(NULL, c, 0, ind_maxp_wk)) != NULL)
|
|
Karsten Hopp |
0646d8 |
{
|
|
Karsten Hopp |
0646d8 |
/* check if the ( is in a // comment */
|
|
Karsten Hopp |
0646d8 |
if ((colnr_T)cin_skip2pos(trypos) > trypos->col)
|
|
Karsten Hopp |
0646d8 |
+ {
|
|
Karsten Hopp |
0646d8 |
+ ind_maxp_wk = ind_maxparen - (int)(cursor_save.lnum - trypos->lnum);
|
|
Karsten Hopp |
0646d8 |
+ if (ind_maxp_wk > 0)
|
|
Karsten Hopp |
0646d8 |
+ {
|
|
Karsten Hopp |
0646d8 |
+ curwin->w_cursor = *trypos;
|
|
Karsten Hopp |
0646d8 |
+ curwin->w_cursor.col = 0; /* XXX */
|
|
Karsten Hopp |
0646d8 |
+ goto retry;
|
|
Karsten Hopp |
0646d8 |
+ }
|
|
Karsten Hopp |
0646d8 |
trypos = NULL;
|
|
Karsten Hopp |
0646d8 |
+ }
|
|
Karsten Hopp |
0646d8 |
else
|
|
Karsten Hopp |
0646d8 |
{
|
|
Karsten Hopp |
0646d8 |
+ pos_T *trypos_wk;
|
|
Karsten Hopp |
0646d8 |
+
|
|
Karsten Hopp |
0646d8 |
pos_copy = *trypos; /* copy trypos, findmatch will change it */
|
|
Karsten Hopp |
0646d8 |
trypos = &pos_copy;
|
|
Karsten Hopp |
0646d8 |
curwin->w_cursor = *trypos;
|
|
Karsten Hopp |
0646d8 |
! if ((trypos_wk = ind_find_start_comment()) != NULL) /* XXX */
|
|
Karsten Hopp |
0646d8 |
! {
|
|
Karsten Hopp |
0646d8 |
! ind_maxp_wk = ind_maxparen - (int)(cursor_save.lnum
|
|
Karsten Hopp |
0646d8 |
! - trypos_wk->lnum);
|
|
Karsten Hopp |
0646d8 |
! if (ind_maxp_wk > 0)
|
|
Karsten Hopp |
0646d8 |
! {
|
|
Karsten Hopp |
0646d8 |
! curwin->w_cursor = *trypos_wk;
|
|
Karsten Hopp |
0646d8 |
! goto retry;
|
|
Karsten Hopp |
0646d8 |
! }
|
|
Karsten Hopp |
0646d8 |
trypos = NULL;
|
|
Karsten Hopp |
0646d8 |
+ }
|
|
Karsten Hopp |
0646d8 |
}
|
|
Karsten Hopp |
0646d8 |
}
|
|
Karsten Hopp |
0646d8 |
curwin->w_cursor = cursor_save;
|
|
Karsten Hopp |
0646d8 |
***************
|
|
Karsten Hopp |
0646d8 |
*** 7024,7030 ****
|
|
Karsten Hopp |
0646d8 |
#define LOOKFOR_CPP_BASECLASS 9
|
|
Karsten Hopp |
0646d8 |
#define LOOKFOR_ENUM_OR_INIT 10
|
|
Karsten Hopp |
0646d8 |
#define LOOKFOR_JS_KEY 11
|
|
Karsten Hopp |
0646d8 |
! #define LOOKFOR_NO_COMMA 12
|
|
Karsten Hopp |
0646d8 |
|
|
Karsten Hopp |
0646d8 |
int whilelevel;
|
|
Karsten Hopp |
0646d8 |
linenr_T lnum;
|
|
Karsten Hopp |
0646d8 |
--- 7047,7053 ----
|
|
Karsten Hopp |
0646d8 |
#define LOOKFOR_CPP_BASECLASS 9
|
|
Karsten Hopp |
0646d8 |
#define LOOKFOR_ENUM_OR_INIT 10
|
|
Karsten Hopp |
0646d8 |
#define LOOKFOR_JS_KEY 11
|
|
Karsten Hopp |
0646d8 |
! #define LOOKFOR_COMMA 12
|
|
Karsten Hopp |
0646d8 |
|
|
Karsten Hopp |
0646d8 |
int whilelevel;
|
|
Karsten Hopp |
0646d8 |
linenr_T lnum;
|
|
Karsten Hopp |
0646d8 |
***************
|
|
Karsten Hopp |
0646d8 |
*** 7842,7848 ****
|
|
Karsten Hopp |
0646d8 |
else
|
|
Karsten Hopp |
0646d8 |
{
|
|
Karsten Hopp |
0646d8 |
if (lookfor != LOOKFOR_TERM
|
|
Karsten Hopp |
0646d8 |
! && lookfor != LOOKFOR_CPP_BASECLASS)
|
|
Karsten Hopp |
0646d8 |
{
|
|
Karsten Hopp |
0646d8 |
amount = scope_amount;
|
|
Karsten Hopp |
0646d8 |
if (theline[0] == '{')
|
|
Karsten Hopp |
0646d8 |
--- 7865,7872 ----
|
|
Karsten Hopp |
0646d8 |
else
|
|
Karsten Hopp |
0646d8 |
{
|
|
Karsten Hopp |
0646d8 |
if (lookfor != LOOKFOR_TERM
|
|
Karsten Hopp |
0646d8 |
! && lookfor != LOOKFOR_CPP_BASECLASS
|
|
Karsten Hopp |
0646d8 |
! && lookfor != LOOKFOR_COMMA)
|
|
Karsten Hopp |
0646d8 |
{
|
|
Karsten Hopp |
0646d8 |
amount = scope_amount;
|
|
Karsten Hopp |
0646d8 |
if (theline[0] == '{')
|
|
Karsten Hopp |
0646d8 |
***************
|
|
Karsten Hopp |
0646d8 |
*** 8134,8156 ****
|
|
Karsten Hopp |
0646d8 |
amount = get_indent();
|
|
Karsten Hopp |
0646d8 |
break;
|
|
Karsten Hopp |
0646d8 |
}
|
|
Karsten Hopp |
0646d8 |
! if (lookfor == LOOKFOR_NO_COMMA)
|
|
Karsten Hopp |
0646d8 |
{
|
|
Karsten Hopp |
0646d8 |
! if (terminated != ',')
|
|
Karsten Hopp |
0646d8 |
/* line below current line is the one that starts a
|
|
Karsten Hopp |
0646d8 |
* (possibly broken) line ending in a comma. */
|
|
Karsten Hopp |
0646d8 |
break;
|
|
Karsten Hopp |
0646d8 |
! amount = get_indent();
|
|
Karsten Hopp |
0646d8 |
! if (curwin->w_cursor.lnum - 1 == ourscope)
|
|
Karsten Hopp |
0646d8 |
! /* line above is start of the scope, thus current line
|
|
Karsten Hopp |
0646d8 |
! * is the one that stars a (possibly broken) line
|
|
Karsten Hopp |
0646d8 |
! * ending in a comma. */
|
|
Karsten Hopp |
0646d8 |
! break;
|
|
Karsten Hopp |
0646d8 |
}
|
|
Karsten Hopp |
0646d8 |
|
|
Karsten Hopp |
0646d8 |
if (terminated == 0 || (lookfor != LOOKFOR_UNTERM
|
|
Karsten Hopp |
0646d8 |
&& terminated == ','))
|
|
Karsten Hopp |
0646d8 |
{
|
|
Karsten Hopp |
0646d8 |
/*
|
|
Karsten Hopp |
0646d8 |
* if we're in the middle of a paren thing,
|
|
Karsten Hopp |
0646d8 |
* go back to the line that starts it so
|
|
Karsten Hopp |
0646d8 |
--- 8158,8188 ----
|
|
Karsten Hopp |
0646d8 |
amount = get_indent();
|
|
Karsten Hopp |
0646d8 |
break;
|
|
Karsten Hopp |
0646d8 |
}
|
|
Karsten Hopp |
0646d8 |
! if (lookfor == LOOKFOR_COMMA)
|
|
Karsten Hopp |
0646d8 |
{
|
|
Karsten Hopp |
0646d8 |
! if (tryposBrace != NULL && tryposBrace->lnum
|
|
Karsten Hopp |
0646d8 |
! >= curwin->w_cursor.lnum)
|
|
Karsten Hopp |
0646d8 |
! break;
|
|
Karsten Hopp |
0646d8 |
! if (terminated == ',')
|
|
Karsten Hopp |
0646d8 |
/* line below current line is the one that starts a
|
|
Karsten Hopp |
0646d8 |
* (possibly broken) line ending in a comma. */
|
|
Karsten Hopp |
0646d8 |
break;
|
|
Karsten Hopp |
0646d8 |
! else
|
|
Karsten Hopp |
0646d8 |
! {
|
|
Karsten Hopp |
0646d8 |
! amount = get_indent();
|
|
Karsten Hopp |
0646d8 |
! if (curwin->w_cursor.lnum - 1 == ourscope)
|
|
Karsten Hopp |
0646d8 |
! /* line above is start of the scope, thus current
|
|
Karsten Hopp |
0646d8 |
! * line is the one that stars a (possibly broken)
|
|
Karsten Hopp |
0646d8 |
! * line ending in a comma. */
|
|
Karsten Hopp |
0646d8 |
! break;
|
|
Karsten Hopp |
0646d8 |
! }
|
|
Karsten Hopp |
0646d8 |
}
|
|
Karsten Hopp |
0646d8 |
|
|
Karsten Hopp |
0646d8 |
if (terminated == 0 || (lookfor != LOOKFOR_UNTERM
|
|
Karsten Hopp |
0646d8 |
&& terminated == ','))
|
|
Karsten Hopp |
0646d8 |
{
|
|
Karsten Hopp |
0646d8 |
+ if (*skipwhite(l) == '[' || l[STRLEN(l) - 1] == '[')
|
|
Karsten Hopp |
0646d8 |
+ amount += ind_continuation;
|
|
Karsten Hopp |
0646d8 |
/*
|
|
Karsten Hopp |
0646d8 |
* if we're in the middle of a paren thing,
|
|
Karsten Hopp |
0646d8 |
* go back to the line that starts it so
|
|
Karsten Hopp |
0646d8 |
***************
|
|
Karsten Hopp |
0646d8 |
*** 8389,8395 ****
|
|
Karsten Hopp |
0646d8 |
--- 8421,8430 ----
|
|
Karsten Hopp |
0646d8 |
* 100 +
|
|
Karsten Hopp |
0646d8 |
* -> here;
|
|
Karsten Hopp |
0646d8 |
*/
|
|
Karsten Hopp |
0646d8 |
+ l = ml_get_curline();
|
|
Karsten Hopp |
0646d8 |
amount = cur_amount;
|
|
Karsten Hopp |
0646d8 |
+ if (*skipwhite(l) == ']' || l[STRLEN(l) - 1] == ']')
|
|
Karsten Hopp |
0646d8 |
+ break;
|
|
Karsten Hopp |
0646d8 |
|
|
Karsten Hopp |
0646d8 |
/*
|
|
Karsten Hopp |
0646d8 |
* If previous line ends in ',', check whether we
|
|
Karsten Hopp |
0646d8 |
***************
|
|
Karsten Hopp |
0646d8 |
*** 8418,8425 ****
|
|
Karsten Hopp |
0646d8 |
* 5,
|
|
Karsten Hopp |
0646d8 |
* 6,
|
|
Karsten Hopp |
0646d8 |
*/
|
|
Karsten Hopp |
0646d8 |
! lookfor = LOOKFOR_NO_COMMA;
|
|
Karsten Hopp |
0646d8 |
! amount = get_indent(); /* XXX */
|
|
Karsten Hopp |
0646d8 |
trypos = find_match_char('[',
|
|
Karsten Hopp |
0646d8 |
curbuf->b_ind_maxparen);
|
|
Karsten Hopp |
0646d8 |
if (trypos != NULL)
|
|
Karsten Hopp |
0646d8 |
--- 8453,8461 ----
|
|
Karsten Hopp |
0646d8 |
* 5,
|
|
Karsten Hopp |
0646d8 |
* 6,
|
|
Karsten Hopp |
0646d8 |
*/
|
|
Karsten Hopp |
0646d8 |
! if (cin_iscomment(skipwhite(l)))
|
|
Karsten Hopp |
0646d8 |
! break;
|
|
Karsten Hopp |
0646d8 |
! lookfor = LOOKFOR_COMMA;
|
|
Karsten Hopp |
0646d8 |
trypos = find_match_char('[',
|
|
Karsten Hopp |
0646d8 |
curbuf->b_ind_maxparen);
|
|
Karsten Hopp |
0646d8 |
if (trypos != NULL)
|
|
Karsten Hopp |
0646d8 |
***************
|
|
Karsten Hopp |
0646d8 |
*** 8449,8455 ****
|
|
Karsten Hopp |
0646d8 |
cont_amount = cin_get_equal_amount(
|
|
Karsten Hopp |
0646d8 |
curwin->w_cursor.lnum);
|
|
Karsten Hopp |
0646d8 |
if (lookfor != LOOKFOR_TERM
|
|
Karsten Hopp |
0646d8 |
! && lookfor != LOOKFOR_JS_KEY)
|
|
Karsten Hopp |
0646d8 |
lookfor = LOOKFOR_UNTERM;
|
|
Karsten Hopp |
0646d8 |
}
|
|
Karsten Hopp |
0646d8 |
}
|
|
Karsten Hopp |
0646d8 |
--- 8485,8492 ----
|
|
Karsten Hopp |
0646d8 |
cont_amount = cin_get_equal_amount(
|
|
Karsten Hopp |
0646d8 |
curwin->w_cursor.lnum);
|
|
Karsten Hopp |
0646d8 |
if (lookfor != LOOKFOR_TERM
|
|
Karsten Hopp |
0646d8 |
! && lookfor != LOOKFOR_JS_KEY
|
|
Karsten Hopp |
0646d8 |
! && lookfor != LOOKFOR_COMMA)
|
|
Karsten Hopp |
0646d8 |
lookfor = LOOKFOR_UNTERM;
|
|
Karsten Hopp |
0646d8 |
}
|
|
Karsten Hopp |
0646d8 |
}
|
|
Karsten Hopp |
0646d8 |
*** ../vim-7.4.669/src/testdir/test3.in 2014-08-06 17:44:09.867161966 +0200
|
|
Karsten Hopp |
0646d8 |
--- src/testdir/test3.in 2015-03-20 18:48:42.478174688 +0100
|
|
Karsten Hopp |
0646d8 |
***************
|
|
Karsten Hopp |
0646d8 |
*** 2065,2070 ****
|
|
Karsten Hopp |
0646d8 |
--- 2065,2228 ----
|
|
Karsten Hopp |
0646d8 |
JSEND
|
|
Karsten Hopp |
0646d8 |
|
|
Karsten Hopp |
0646d8 |
STARTTEST
|
|
Karsten Hopp |
0646d8 |
+ :set cino=j1,J1,+2
|
|
Karsten Hopp |
0646d8 |
+ /^JSSTART
|
|
Karsten Hopp |
0646d8 |
+ =/^JSEND
|
|
Karsten Hopp |
0646d8 |
+ ENDTEST
|
|
Karsten Hopp |
0646d8 |
+
|
|
Karsten Hopp |
0646d8 |
+ JSSTART
|
|
Karsten Hopp |
0646d8 |
+ // Results of JavaScript indent
|
|
Karsten Hopp |
0646d8 |
+ // 1
|
|
Karsten Hopp |
0646d8 |
+ (function(){
|
|
Karsten Hopp |
0646d8 |
+ var a = [
|
|
Karsten Hopp |
0646d8 |
+ 'a',
|
|
Karsten Hopp |
0646d8 |
+ 'b',
|
|
Karsten Hopp |
0646d8 |
+ 'c',
|
|
Karsten Hopp |
0646d8 |
+ 'd',
|
|
Karsten Hopp |
0646d8 |
+ 'e',
|
|
Karsten Hopp |
0646d8 |
+ 'f',
|
|
Karsten Hopp |
0646d8 |
+ 'g',
|
|
Karsten Hopp |
0646d8 |
+ 'h',
|
|
Karsten Hopp |
0646d8 |
+ 'i'
|
|
Karsten Hopp |
0646d8 |
+ ];
|
|
Karsten Hopp |
0646d8 |
+ }())
|
|
Karsten Hopp |
0646d8 |
+
|
|
Karsten Hopp |
0646d8 |
+ // 2
|
|
Karsten Hopp |
0646d8 |
+ (function(){
|
|
Karsten Hopp |
0646d8 |
+ var a = [
|
|
Karsten Hopp |
0646d8 |
+ 0 +
|
|
Karsten Hopp |
0646d8 |
+ 5 *
|
|
Karsten Hopp |
0646d8 |
+ 9 *
|
|
Karsten Hopp |
0646d8 |
+ 'a',
|
|
Karsten Hopp |
0646d8 |
+ 'b',
|
|
Karsten Hopp |
0646d8 |
+ 0 +
|
|
Karsten Hopp |
0646d8 |
+ 5 *
|
|
Karsten Hopp |
0646d8 |
+ 9 *
|
|
Karsten Hopp |
0646d8 |
+ 'c',
|
|
Karsten Hopp |
0646d8 |
+ 'd',
|
|
Karsten Hopp |
0646d8 |
+ 'e',
|
|
Karsten Hopp |
0646d8 |
+ 'f',
|
|
Karsten Hopp |
0646d8 |
+ 'g',
|
|
Karsten Hopp |
0646d8 |
+ 'h',
|
|
Karsten Hopp |
0646d8 |
+ 'i'
|
|
Karsten Hopp |
0646d8 |
+ ];
|
|
Karsten Hopp |
0646d8 |
+ }())
|
|
Karsten Hopp |
0646d8 |
+
|
|
Karsten Hopp |
0646d8 |
+ // 3
|
|
Karsten Hopp |
0646d8 |
+ (function(){
|
|
Karsten Hopp |
0646d8 |
+ var a = [
|
|
Karsten Hopp |
0646d8 |
+ 0 +
|
|
Karsten Hopp |
0646d8 |
+ // comment 1
|
|
Karsten Hopp |
0646d8 |
+ 5 *
|
|
Karsten Hopp |
0646d8 |
+ /* comment 2 */
|
|
Karsten Hopp |
0646d8 |
+ 9 *
|
|
Karsten Hopp |
0646d8 |
+ 'a',
|
|
Karsten Hopp |
0646d8 |
+ 'b',
|
|
Karsten Hopp |
0646d8 |
+ 0 +
|
|
Karsten Hopp |
0646d8 |
+ 5 *
|
|
Karsten Hopp |
0646d8 |
+ 9 *
|
|
Karsten Hopp |
0646d8 |
+ 'c',
|
|
Karsten Hopp |
0646d8 |
+ 'd',
|
|
Karsten Hopp |
0646d8 |
+ 'e',
|
|
Karsten Hopp |
0646d8 |
+ 'f',
|
|
Karsten Hopp |
0646d8 |
+ 'g',
|
|
Karsten Hopp |
0646d8 |
+ 'h',
|
|
Karsten Hopp |
0646d8 |
+ 'i'
|
|
Karsten Hopp |
0646d8 |
+ ];
|
|
Karsten Hopp |
0646d8 |
+ }())
|
|
Karsten Hopp |
0646d8 |
+
|
|
Karsten Hopp |
0646d8 |
+ // 4
|
|
Karsten Hopp |
0646d8 |
+ {
|
|
Karsten Hopp |
0646d8 |
+ var a = [
|
|
Karsten Hopp |
0646d8 |
+ 0,
|
|
Karsten Hopp |
0646d8 |
+ 1
|
|
Karsten Hopp |
0646d8 |
+ ];
|
|
Karsten Hopp |
0646d8 |
+ var b;
|
|
Karsten Hopp |
0646d8 |
+ var c;
|
|
Karsten Hopp |
0646d8 |
+ }
|
|
Karsten Hopp |
0646d8 |
+
|
|
Karsten Hopp |
0646d8 |
+ // 5
|
|
Karsten Hopp |
0646d8 |
+ {
|
|
Karsten Hopp |
0646d8 |
+ var a = [
|
|
Karsten Hopp |
0646d8 |
+ [
|
|
Karsten Hopp |
0646d8 |
+ 0
|
|
Karsten Hopp |
0646d8 |
+ ],
|
|
Karsten Hopp |
0646d8 |
+ 2,
|
|
Karsten Hopp |
0646d8 |
+ 3
|
|
Karsten Hopp |
0646d8 |
+ ];
|
|
Karsten Hopp |
0646d8 |
+ }
|
|
Karsten Hopp |
0646d8 |
+
|
|
Karsten Hopp |
0646d8 |
+ // 6
|
|
Karsten Hopp |
0646d8 |
+ {
|
|
Karsten Hopp |
0646d8 |
+ var a = [
|
|
Karsten Hopp |
0646d8 |
+ [
|
|
Karsten Hopp |
0646d8 |
+ 0,
|
|
Karsten Hopp |
0646d8 |
+ 1
|
|
Karsten Hopp |
0646d8 |
+ ],
|
|
Karsten Hopp |
0646d8 |
+ 2,
|
|
Karsten Hopp |
0646d8 |
+ 3
|
|
Karsten Hopp |
0646d8 |
+ ];
|
|
Karsten Hopp |
0646d8 |
+ }
|
|
Karsten Hopp |
0646d8 |
+
|
|
Karsten Hopp |
0646d8 |
+ // 7
|
|
Karsten Hopp |
0646d8 |
+ {
|
|
Karsten Hopp |
0646d8 |
+ var a = [
|
|
Karsten Hopp |
0646d8 |
+ // [
|
|
Karsten Hopp |
0646d8 |
+ 0,
|
|
Karsten Hopp |
0646d8 |
+ // 1
|
|
Karsten Hopp |
0646d8 |
+ // ],
|
|
Karsten Hopp |
0646d8 |
+ 2,
|
|
Karsten Hopp |
0646d8 |
+ 3
|
|
Karsten Hopp |
0646d8 |
+ ];
|
|
Karsten Hopp |
0646d8 |
+ }
|
|
Karsten Hopp |
0646d8 |
+
|
|
Karsten Hopp |
0646d8 |
+ // 8
|
|
Karsten Hopp |
0646d8 |
+ var x = [
|
|
Karsten Hopp |
0646d8 |
+ (function(){
|
|
Karsten Hopp |
0646d8 |
+ var a,
|
|
Karsten Hopp |
0646d8 |
+ b,
|
|
Karsten Hopp |
0646d8 |
+ c,
|
|
Karsten Hopp |
0646d8 |
+ d,
|
|
Karsten Hopp |
0646d8 |
+ e,
|
|
Karsten Hopp |
0646d8 |
+ f,
|
|
Karsten Hopp |
0646d8 |
+ g,
|
|
Karsten Hopp |
0646d8 |
+ h,
|
|
Karsten Hopp |
0646d8 |
+ i;
|
|
Karsten Hopp |
0646d8 |
+ })
|
|
Karsten Hopp |
0646d8 |
+ ];
|
|
Karsten Hopp |
0646d8 |
+
|
|
Karsten Hopp |
0646d8 |
+ // 9
|
|
Karsten Hopp |
0646d8 |
+ var a = [
|
|
Karsten Hopp |
0646d8 |
+ 0 +
|
|
Karsten Hopp |
0646d8 |
+ 5 *
|
|
Karsten Hopp |
0646d8 |
+ 9 *
|
|
Karsten Hopp |
0646d8 |
+ 'a',
|
|
Karsten Hopp |
0646d8 |
+ 'b',
|
|
Karsten Hopp |
0646d8 |
+ 0 +
|
|
Karsten Hopp |
0646d8 |
+ 5 *
|
|
Karsten Hopp |
0646d8 |
+ 9 *
|
|
Karsten Hopp |
0646d8 |
+ 'c',
|
|
Karsten Hopp |
0646d8 |
+ 'd',
|
|
Karsten Hopp |
0646d8 |
+ 'e',
|
|
Karsten Hopp |
0646d8 |
+ 'f',
|
|
Karsten Hopp |
0646d8 |
+ 'g',
|
|
Karsten Hopp |
0646d8 |
+ 'h',
|
|
Karsten Hopp |
0646d8 |
+ 'i'
|
|
Karsten Hopp |
0646d8 |
+ ];
|
|
Karsten Hopp |
0646d8 |
+
|
|
Karsten Hopp |
0646d8 |
+ // 10
|
|
Karsten Hopp |
0646d8 |
+ var a,
|
|
Karsten Hopp |
0646d8 |
+ b,
|
|
Karsten Hopp |
0646d8 |
+ c,
|
|
Karsten Hopp |
0646d8 |
+ d,
|
|
Karsten Hopp |
0646d8 |
+ e,
|
|
Karsten Hopp |
0646d8 |
+ f,
|
|
Karsten Hopp |
0646d8 |
+ g,
|
|
Karsten Hopp |
0646d8 |
+ h,
|
|
Karsten Hopp |
0646d8 |
+ i;
|
|
Karsten Hopp |
0646d8 |
+ JSEND
|
|
Karsten Hopp |
0646d8 |
+
|
|
Karsten Hopp |
0646d8 |
+ STARTTEST
|
|
Karsten Hopp |
0646d8 |
:g/^STARTTEST/.,/^ENDTEST/d
|
|
Karsten Hopp |
0646d8 |
:1;/start of AUTO/,$wq! test.out
|
|
Karsten Hopp |
0646d8 |
ENDTEST
|
|
Karsten Hopp |
0646d8 |
*** ../vim-7.4.669/src/testdir/test3.ok 2014-08-06 17:44:09.867161966 +0200
|
|
Karsten Hopp |
0646d8 |
--- src/testdir/test3.ok 2015-03-20 18:55:10.709787690 +0100
|
|
Karsten Hopp |
0646d8 |
***************
|
|
Karsten Hopp |
0646d8 |
*** 1832,1834 ****
|
|
Karsten Hopp |
0646d8 |
--- 1832,1987 ----
|
|
Karsten Hopp |
0646d8 |
})(jQuery);
|
|
Karsten Hopp |
0646d8 |
JSEND
|
|
Karsten Hopp |
0646d8 |
|
|
Karsten Hopp |
0646d8 |
+
|
|
Karsten Hopp |
0646d8 |
+ JSSTART
|
|
Karsten Hopp |
0646d8 |
+ // Results of JavaScript indent
|
|
Karsten Hopp |
0646d8 |
+ // 1
|
|
Karsten Hopp |
0646d8 |
+ (function(){
|
|
Karsten Hopp |
0646d8 |
+ var a = [
|
|
Karsten Hopp |
0646d8 |
+ 'a',
|
|
Karsten Hopp |
0646d8 |
+ 'b',
|
|
Karsten Hopp |
0646d8 |
+ 'c',
|
|
Karsten Hopp |
0646d8 |
+ 'd',
|
|
Karsten Hopp |
0646d8 |
+ 'e',
|
|
Karsten Hopp |
0646d8 |
+ 'f',
|
|
Karsten Hopp |
0646d8 |
+ 'g',
|
|
Karsten Hopp |
0646d8 |
+ 'h',
|
|
Karsten Hopp |
0646d8 |
+ 'i'
|
|
Karsten Hopp |
0646d8 |
+ ];
|
|
Karsten Hopp |
0646d8 |
+ }())
|
|
Karsten Hopp |
0646d8 |
+
|
|
Karsten Hopp |
0646d8 |
+ // 2
|
|
Karsten Hopp |
0646d8 |
+ (function(){
|
|
Karsten Hopp |
0646d8 |
+ var a = [
|
|
Karsten Hopp |
0646d8 |
+ 0 +
|
|
Karsten Hopp |
0646d8 |
+ 5 *
|
|
Karsten Hopp |
0646d8 |
+ 9 *
|
|
Karsten Hopp |
0646d8 |
+ 'a',
|
|
Karsten Hopp |
0646d8 |
+ 'b',
|
|
Karsten Hopp |
0646d8 |
+ 0 +
|
|
Karsten Hopp |
0646d8 |
+ 5 *
|
|
Karsten Hopp |
0646d8 |
+ 9 *
|
|
Karsten Hopp |
0646d8 |
+ 'c',
|
|
Karsten Hopp |
0646d8 |
+ 'd',
|
|
Karsten Hopp |
0646d8 |
+ 'e',
|
|
Karsten Hopp |
0646d8 |
+ 'f',
|
|
Karsten Hopp |
0646d8 |
+ 'g',
|
|
Karsten Hopp |
0646d8 |
+ 'h',
|
|
Karsten Hopp |
0646d8 |
+ 'i'
|
|
Karsten Hopp |
0646d8 |
+ ];
|
|
Karsten Hopp |
0646d8 |
+ }())
|
|
Karsten Hopp |
0646d8 |
+
|
|
Karsten Hopp |
0646d8 |
+ // 3
|
|
Karsten Hopp |
0646d8 |
+ (function(){
|
|
Karsten Hopp |
0646d8 |
+ var a = [
|
|
Karsten Hopp |
0646d8 |
+ 0 +
|
|
Karsten Hopp |
0646d8 |
+ // comment 1
|
|
Karsten Hopp |
0646d8 |
+ 5 *
|
|
Karsten Hopp |
0646d8 |
+ /* comment 2 */
|
|
Karsten Hopp |
0646d8 |
+ 9 *
|
|
Karsten Hopp |
0646d8 |
+ 'a',
|
|
Karsten Hopp |
0646d8 |
+ 'b',
|
|
Karsten Hopp |
0646d8 |
+ 0 +
|
|
Karsten Hopp |
0646d8 |
+ 5 *
|
|
Karsten Hopp |
0646d8 |
+ 9 *
|
|
Karsten Hopp |
0646d8 |
+ 'c',
|
|
Karsten Hopp |
0646d8 |
+ 'd',
|
|
Karsten Hopp |
0646d8 |
+ 'e',
|
|
Karsten Hopp |
0646d8 |
+ 'f',
|
|
Karsten Hopp |
0646d8 |
+ 'g',
|
|
Karsten Hopp |
0646d8 |
+ 'h',
|
|
Karsten Hopp |
0646d8 |
+ 'i'
|
|
Karsten Hopp |
0646d8 |
+ ];
|
|
Karsten Hopp |
0646d8 |
+ }())
|
|
Karsten Hopp |
0646d8 |
+
|
|
Karsten Hopp |
0646d8 |
+ // 4
|
|
Karsten Hopp |
0646d8 |
+ {
|
|
Karsten Hopp |
0646d8 |
+ var a = [
|
|
Karsten Hopp |
0646d8 |
+ 0,
|
|
Karsten Hopp |
0646d8 |
+ 1
|
|
Karsten Hopp |
0646d8 |
+ ];
|
|
Karsten Hopp |
0646d8 |
+ var b;
|
|
Karsten Hopp |
0646d8 |
+ var c;
|
|
Karsten Hopp |
0646d8 |
+ }
|
|
Karsten Hopp |
0646d8 |
+
|
|
Karsten Hopp |
0646d8 |
+ // 5
|
|
Karsten Hopp |
0646d8 |
+ {
|
|
Karsten Hopp |
0646d8 |
+ var a = [
|
|
Karsten Hopp |
0646d8 |
+ [
|
|
Karsten Hopp |
0646d8 |
+ 0
|
|
Karsten Hopp |
0646d8 |
+ ],
|
|
Karsten Hopp |
0646d8 |
+ 2,
|
|
Karsten Hopp |
0646d8 |
+ 3
|
|
Karsten Hopp |
0646d8 |
+ ];
|
|
Karsten Hopp |
0646d8 |
+ }
|
|
Karsten Hopp |
0646d8 |
+
|
|
Karsten Hopp |
0646d8 |
+ // 6
|
|
Karsten Hopp |
0646d8 |
+ {
|
|
Karsten Hopp |
0646d8 |
+ var a = [
|
|
Karsten Hopp |
0646d8 |
+ [
|
|
Karsten Hopp |
0646d8 |
+ 0,
|
|
Karsten Hopp |
0646d8 |
+ 1
|
|
Karsten Hopp |
0646d8 |
+ ],
|
|
Karsten Hopp |
0646d8 |
+ 2,
|
|
Karsten Hopp |
0646d8 |
+ 3
|
|
Karsten Hopp |
0646d8 |
+ ];
|
|
Karsten Hopp |
0646d8 |
+ }
|
|
Karsten Hopp |
0646d8 |
+
|
|
Karsten Hopp |
0646d8 |
+ // 7
|
|
Karsten Hopp |
0646d8 |
+ {
|
|
Karsten Hopp |
0646d8 |
+ var a = [
|
|
Karsten Hopp |
0646d8 |
+ // [
|
|
Karsten Hopp |
0646d8 |
+ 0,
|
|
Karsten Hopp |
0646d8 |
+ // 1
|
|
Karsten Hopp |
0646d8 |
+ // ],
|
|
Karsten Hopp |
0646d8 |
+ 2,
|
|
Karsten Hopp |
0646d8 |
+ 3
|
|
Karsten Hopp |
0646d8 |
+ ];
|
|
Karsten Hopp |
0646d8 |
+ }
|
|
Karsten Hopp |
0646d8 |
+
|
|
Karsten Hopp |
0646d8 |
+ // 8
|
|
Karsten Hopp |
0646d8 |
+ var x = [
|
|
Karsten Hopp |
0646d8 |
+ (function(){
|
|
Karsten Hopp |
0646d8 |
+ var a,
|
|
Karsten Hopp |
0646d8 |
+ b,
|
|
Karsten Hopp |
0646d8 |
+ c,
|
|
Karsten Hopp |
0646d8 |
+ d,
|
|
Karsten Hopp |
0646d8 |
+ e,
|
|
Karsten Hopp |
0646d8 |
+ f,
|
|
Karsten Hopp |
0646d8 |
+ g,
|
|
Karsten Hopp |
0646d8 |
+ h,
|
|
Karsten Hopp |
0646d8 |
+ i;
|
|
Karsten Hopp |
0646d8 |
+ })
|
|
Karsten Hopp |
0646d8 |
+ ];
|
|
Karsten Hopp |
0646d8 |
+
|
|
Karsten Hopp |
0646d8 |
+ // 9
|
|
Karsten Hopp |
0646d8 |
+ var a = [
|
|
Karsten Hopp |
0646d8 |
+ 0 +
|
|
Karsten Hopp |
0646d8 |
+ 5 *
|
|
Karsten Hopp |
0646d8 |
+ 9 *
|
|
Karsten Hopp |
0646d8 |
+ 'a',
|
|
Karsten Hopp |
0646d8 |
+ 'b',
|
|
Karsten Hopp |
0646d8 |
+ 0 +
|
|
Karsten Hopp |
0646d8 |
+ 5 *
|
|
Karsten Hopp |
0646d8 |
+ 9 *
|
|
Karsten Hopp |
0646d8 |
+ 'c',
|
|
Karsten Hopp |
0646d8 |
+ 'd',
|
|
Karsten Hopp |
0646d8 |
+ 'e',
|
|
Karsten Hopp |
0646d8 |
+ 'f',
|
|
Karsten Hopp |
0646d8 |
+ 'g',
|
|
Karsten Hopp |
0646d8 |
+ 'h',
|
|
Karsten Hopp |
0646d8 |
+ 'i'
|
|
Karsten Hopp |
0646d8 |
+ ];
|
|
Karsten Hopp |
0646d8 |
+
|
|
Karsten Hopp |
0646d8 |
+ // 10
|
|
Karsten Hopp |
0646d8 |
+ var a,
|
|
Karsten Hopp |
0646d8 |
+ b,
|
|
Karsten Hopp |
0646d8 |
+ c,
|
|
Karsten Hopp |
0646d8 |
+ d,
|
|
Karsten Hopp |
0646d8 |
+ e,
|
|
Karsten Hopp |
0646d8 |
+ f,
|
|
Karsten Hopp |
0646d8 |
+ g,
|
|
Karsten Hopp |
0646d8 |
+ h,
|
|
Karsten Hopp |
0646d8 |
+ i;
|
|
Karsten Hopp |
0646d8 |
+ JSEND
|
|
Karsten Hopp |
0646d8 |
+
|
|
Karsten Hopp |
0646d8 |
*** ../vim-7.4.669/src/version.c 2015-03-20 18:11:44.971196311 +0100
|
|
Karsten Hopp |
0646d8 |
--- src/version.c 2015-03-20 18:53:43.626771663 +0100
|
|
Karsten Hopp |
0646d8 |
***************
|
|
Karsten Hopp |
0646d8 |
*** 743,744 ****
|
|
Karsten Hopp |
0646d8 |
--- 743,746 ----
|
|
Karsten Hopp |
0646d8 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
0646d8 |
+ /**/
|
|
Karsten Hopp |
0646d8 |
+ 670,
|
|
Karsten Hopp |
0646d8 |
/**/
|
|
Karsten Hopp |
0646d8 |
|
|
Karsten Hopp |
0646d8 |
--
|
|
Karsten Hopp |
0646d8 |
ARTHUR: What?
|
|
Karsten Hopp |
0646d8 |
BLACK KNIGHT: None shall pass.
|
|
Karsten Hopp |
0646d8 |
ARTHUR: I have no quarrel with you, good Sir knight, but I must cross
|
|
Karsten Hopp |
0646d8 |
this bridge.
|
|
Karsten Hopp |
0646d8 |
BLACK KNIGHT: Then you shall die.
|
|
Karsten Hopp |
0646d8 |
The Quest for the Holy Grail (Monty Python)
|
|
Karsten Hopp |
0646d8 |
|
|
Karsten Hopp |
0646d8 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
0646d8 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
0646d8 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
0646d8 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|