Commits

Anonymous committed 493897f

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)

Comments (0)

Files changed (4)

 	     *			ldfd) {
 	     *		    }
 	     */
-	    if ((ind_keep_case_label
+	    if (ind_js || (ind_keep_case_label
 			   && cin_iscase(skipwhite(ml_get_curline()), FALSE)))
 		amount = get_indent();
 	    else
 
 STARTTEST
 :set cino=N-s
-/namespaces
+/^NAMESPACESTART
 =/^NAMESPACEEND
 ENDTEST
 
+NAMESPACESTART
 /* valid namespaces with normal indent */
 namespace
 {
 
 
 STARTTEST
+:set cino=J1
+/^JSSTART
+=/^JSEND
+ENDTEST
+
+JSSTART
+var bar = {
+foo: {
+that: this,
+some: ok,
+},
+"bar":{
+a : 2,
+b: "123abc",
+x: 4,
+"y": 5
+}
+}
+JSEND
+
+STARTTEST
 :g/^STARTTEST/.,/^ENDTEST/d
 :1;/start of AUTO/,$wq! test.out
 ENDTEST
 }
 
 
+NAMESPACESTART
 /* valid namespaces with normal indent */
 namespace
 {
 NAMESPACEEND
 
 
+
+JSSTART
+var bar = {
+	foo: {
+		that: this,
+		some: ok,
+	},
+	"bar":{
+		a : 2,
+		b: "123abc",
+		x: 4,
+		"y": 5
+	}
+}
+JSEND
+
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    213,
+/**/
     212,
 /**/
     211,