forked from aniani/vim
updated for version 7.3.213
Problem: Javascript object literal is not indented correctly. Solution: Make a special case for when "J1" is in 'cino'. (Luc Deschenaux)
This commit is contained in:
@@ -6965,7 +6965,7 @@ get_c_indent()
|
|||||||
* ldfd) {
|
* ldfd) {
|
||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
if ((ind_keep_case_label
|
if (ind_js || (ind_keep_case_label
|
||||||
&& cin_iscase(skipwhite(ml_get_curline()), FALSE)))
|
&& cin_iscase(skipwhite(ml_get_curline()), FALSE)))
|
||||||
amount = get_indent();
|
amount = get_indent();
|
||||||
else
|
else
|
||||||
|
@@ -1492,10 +1492,11 @@ baz();
|
|||||||
foo(1);
|
foo(1);
|
||||||
} else
|
} else
|
||||||
foo(0);
|
foo(0);
|
||||||
baz();
|
baz();
|
||||||
}
|
}
|
||||||
|
|
||||||
STARTTEST
|
STARTTEST
|
||||||
|
:set cino=N-s
|
||||||
/^NAMESPACESTART
|
/^NAMESPACESTART
|
||||||
=/^NAMESPACEEND
|
=/^NAMESPACEEND
|
||||||
ENDTEST
|
ENDTEST
|
||||||
@@ -1560,6 +1561,27 @@ namespace111111111
|
|||||||
}
|
}
|
||||||
namespace111111111
|
namespace111111111
|
||||||
{
|
{
|
||||||
|
111111111111111111;
|
||||||
|
}
|
||||||
|
NAMESPACEEND
|
||||||
|
|
||||||
|
|
||||||
|
STARTTEST
|
||||||
|
:set cino=J1
|
||||||
|
/^JSSTART
|
||||||
|
=/^JSEND
|
||||||
|
ENDTEST
|
||||||
|
|
||||||
|
JSSTART
|
||||||
|
var bar = {
|
||||||
|
foo: {
|
||||||
|
that: this,
|
||||||
|
some: ok,
|
||||||
|
},
|
||||||
|
"bar":{
|
||||||
|
a : 2,
|
||||||
|
b: "123abc",
|
||||||
|
x: 4,
|
||||||
"y": 5
|
"y": 5
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1337,6 +1337,7 @@ void func(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
NAMESPACESTART
|
||||||
/* valid namespaces with normal indent */
|
/* valid namespaces with normal indent */
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
@@ -1401,3 +1402,19 @@ namespace111111111
|
|||||||
NAMESPACEEND
|
NAMESPACEEND
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
JSSTART
|
||||||
|
var bar = {
|
||||||
|
foo: {
|
||||||
|
that: this,
|
||||||
|
some: ok,
|
||||||
|
},
|
||||||
|
"bar":{
|
||||||
|
a : 2,
|
||||||
|
b: "123abc",
|
||||||
|
x: 4,
|
||||||
|
"y": 5
|
||||||
|
}
|
||||||
|
}
|
||||||
|
JSEND
|
||||||
|
|
||||||
|
@@ -709,6 +709,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
213,
|
||||||
/**/
|
/**/
|
||||||
212,
|
212,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user