Karsten Hopp b167e3
To: vim_dev@googlegroups.com
Karsten Hopp b167e3
Subject: Patch 7.3.213
Karsten Hopp b167e3
Fcc: outbox
Karsten Hopp b167e3
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp b167e3
Mime-Version: 1.0
Karsten Hopp b167e3
Content-Type: text/plain; charset=UTF-8
Karsten Hopp b167e3
Content-Transfer-Encoding: 8bit
Karsten Hopp b167e3
------------
Karsten Hopp b167e3
Karsten Hopp b167e3
Patch 7.3.213
Karsten Hopp b167e3
Problem:    Javascript object literal is not indented correctly.
Karsten Hopp b167e3
Solution:   Make a special case for when "J1" is in 'cino'. (Luc Deschenaux)
Karsten Hopp b167e3
Files:      src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok
Karsten Hopp b167e3
Karsten Hopp b167e3
Karsten Hopp b167e3
*** ../mercurial/vim73/src/misc1.c	2011-05-25 17:29:40.000000000 +0200
Karsten Hopp b167e3
--- src/misc1.c	2011-06-10 04:58:10.000000000 +0200
Karsten Hopp b167e3
***************
Karsten Hopp b167e3
*** 6965,6971 ****
Karsten Hopp b167e3
  	     *			ldfd) {
Karsten Hopp b167e3
  	     *		    }
Karsten Hopp b167e3
  	     */
Karsten Hopp b167e3
! 	    if ((ind_keep_case_label
Karsten Hopp b167e3
  			   && cin_iscase(skipwhite(ml_get_curline()), FALSE)))
Karsten Hopp b167e3
  		amount = get_indent();
Karsten Hopp b167e3
  	    else
Karsten Hopp b167e3
--- 6965,6971 ----
Karsten Hopp b167e3
  	     *			ldfd) {
Karsten Hopp b167e3
  	     *		    }
Karsten Hopp b167e3
  	     */
Karsten Hopp b167e3
! 	    if (ind_js || (ind_keep_case_label
Karsten Hopp b167e3
  			   && cin_iscase(skipwhite(ml_get_curline()), FALSE)))
Karsten Hopp b167e3
  		amount = get_indent();
Karsten Hopp b167e3
  	    else
Karsten Hopp b167e3
*** ../mercurial/vim73/src/testdir/test3.in	2011-05-25 15:16:06.000000000 +0200
Karsten Hopp b167e3
--- src/testdir/test3.in	2011-06-12 21:44:12.000000000 +0200
Karsten Hopp b167e3
***************
Karsten Hopp b167e3
*** 1492,1501 ****
Karsten Hopp b167e3
  
Karsten Hopp b167e3
  STARTTEST
Karsten Hopp b167e3
  :set cino=N-s
Karsten Hopp b167e3
! /namespaces
Karsten Hopp b167e3
  =/^NAMESPACEEND
Karsten Hopp b167e3
  ENDTEST
Karsten Hopp b167e3
  
Karsten Hopp b167e3
  /* valid namespaces with normal indent */
Karsten Hopp b167e3
  namespace
Karsten Hopp b167e3
  {
Karsten Hopp b167e3
--- 1492,1502 ----
Karsten Hopp b167e3
  
Karsten Hopp b167e3
  STARTTEST
Karsten Hopp b167e3
  :set cino=N-s
Karsten Hopp b167e3
! /^NAMESPACESTART
Karsten Hopp b167e3
  =/^NAMESPACEEND
Karsten Hopp b167e3
  ENDTEST
Karsten Hopp b167e3
  
Karsten Hopp b167e3
+ NAMESPACESTART
Karsten Hopp b167e3
  /* valid namespaces with normal indent */
Karsten Hopp b167e3
  namespace
Karsten Hopp b167e3
  {
Karsten Hopp b167e3
***************
Karsten Hopp b167e3
*** 1561,1566 ****
Karsten Hopp b167e3
--- 1562,1588 ----
Karsten Hopp b167e3
  
Karsten Hopp b167e3
  
Karsten Hopp b167e3
  STARTTEST
Karsten Hopp b167e3
+ :set cino=J1
Karsten Hopp b167e3
+ /^JSSTART
Karsten Hopp b167e3
+ =/^JSEND
Karsten Hopp b167e3
+ ENDTEST
Karsten Hopp b167e3
+ 
Karsten Hopp b167e3
+ JSSTART
Karsten Hopp b167e3
+ var bar = {
Karsten Hopp b167e3
+ foo: {
Karsten Hopp b167e3
+ that: this,
Karsten Hopp b167e3
+ some: ok,
Karsten Hopp b167e3
+ },
Karsten Hopp b167e3
+ "bar":{
Karsten Hopp b167e3
+ a : 2,
Karsten Hopp b167e3
+ b: "123abc",
Karsten Hopp b167e3
+ x: 4,
Karsten Hopp b167e3
+ "y": 5
Karsten Hopp b167e3
+ }
Karsten Hopp b167e3
+ }
Karsten Hopp b167e3
+ JSEND
Karsten Hopp b167e3
+ 
Karsten Hopp b167e3
+ STARTTEST
Karsten Hopp b167e3
  :g/^STARTTEST/.,/^ENDTEST/d
Karsten Hopp b167e3
  :1;/start of AUTO/,$wq! test.out
Karsten Hopp b167e3
  ENDTEST
Karsten Hopp b167e3
*** ../mercurial/vim73/src/testdir/test3.ok	2011-05-25 15:16:06.000000000 +0200
Karsten Hopp b167e3
--- src/testdir/test3.ok	2011-06-12 21:44:26.000000000 +0200
Karsten Hopp b167e3
***************
Karsten Hopp b167e3
*** 1337,1342 ****
Karsten Hopp b167e3
--- 1337,1343 ----
Karsten Hopp b167e3
  }
Karsten Hopp b167e3
  
Karsten Hopp b167e3
  
Karsten Hopp b167e3
+ NAMESPACESTART
Karsten Hopp b167e3
  /* valid namespaces with normal indent */
Karsten Hopp b167e3
  namespace
Karsten Hopp b167e3
  {
Karsten Hopp b167e3
***************
Karsten Hopp b167e3
*** 1401,1403 ****
Karsten Hopp b167e3
--- 1402,1420 ----
Karsten Hopp b167e3
  NAMESPACEEND
Karsten Hopp b167e3
  
Karsten Hopp b167e3
  
Karsten Hopp b167e3
+ 
Karsten Hopp b167e3
+ JSSTART
Karsten Hopp b167e3
+ var bar = {
Karsten Hopp b167e3
+ 	foo: {
Karsten Hopp b167e3
+ 		that: this,
Karsten Hopp b167e3
+ 		some: ok,
Karsten Hopp b167e3
+ 	},
Karsten Hopp b167e3
+ 	"bar":{
Karsten Hopp b167e3
+ 		a : 2,
Karsten Hopp b167e3
+ 		b: "123abc",
Karsten Hopp b167e3
+ 		x: 4,
Karsten Hopp b167e3
+ 		"y": 5
Karsten Hopp b167e3
+ 	}
Karsten Hopp b167e3
+ }
Karsten Hopp b167e3
+ JSEND
Karsten Hopp b167e3
+ 
Karsten Hopp b167e3
*** ../vim-7.3.212/src/version.c	2011-06-12 21:37:06.000000000 +0200
Karsten Hopp b167e3
--- src/version.c	2011-06-12 21:48:34.000000000 +0200
Karsten Hopp b167e3
***************
Karsten Hopp b167e3
*** 711,712 ****
Karsten Hopp b167e3
--- 711,714 ----
Karsten Hopp b167e3
  {   /* Add new patch number below this line */
Karsten Hopp b167e3
+ /**/
Karsten Hopp b167e3
+     213,
Karsten Hopp b167e3
  /**/
Karsten Hopp b167e3
Karsten Hopp b167e3
-- 
Karsten Hopp b167e3
hundred-and-one symptoms of being an internet addict:
Karsten Hopp b167e3
169. You hire a housekeeper for your home page.
Karsten Hopp b167e3
Karsten Hopp b167e3
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp b167e3
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp b167e3
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp b167e3
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///