195918c
To: vim_dev@googlegroups.com
195918c
Subject: Patch 7.3.179
195918c
Fcc: outbox
195918c
From: Bram Moolenaar <Bram@moolenaar.net>
195918c
Mime-Version: 1.0
195918c
Content-Type: text/plain; charset=UTF-8
195918c
Content-Transfer-Encoding: 8bit
195918c
------------
195918c
195918c
Patch 7.3.179
195918c
Problem:    C-indent doesn't handle colon in string correctly.
195918c
Solution:   Skip the string. (Lech Lorens)
195918c
Files:	    src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok
195918c
195918c
195918c
*** ../vim-7.3.178/src/misc1.c	2011-05-10 11:39:13.000000000 +0200
195918c
--- src/misc1.c	2011-05-10 11:50:14.000000000 +0200
195918c
***************
195918c
*** 5801,5807 ****
195918c
  		continue;
195918c
  	}
195918c
  
195918c
! 	if (s[0] == ':')
195918c
  	{
195918c
  	    if (s[1] == ':')
195918c
  	    {
195918c
--- 5801,5809 ----
195918c
  		continue;
195918c
  	}
195918c
  
195918c
! 	if (s[0] == '"')
195918c
! 	    s = skip_string(s) + 1;
195918c
! 	else if (s[0] == ':')
195918c
  	{
195918c
  	    if (s[1] == ':')
195918c
  	    {
195918c
*** ../vim-7.3.178/src/testdir/test3.in	2011-05-10 11:39:13.000000000 +0200
195918c
--- src/testdir/test3.in	2011-05-10 11:53:02.000000000 +0200
195918c
***************
195918c
*** 1360,1365 ****
195918c
--- 1360,1378 ----
195918c
  }
195918c
  
195918c
  STARTTEST
195918c
+ :set cino&
195918c
+ 2kdd=][
195918c
+ ENDTEST
195918c
+ 
195918c
+ void func(void)
195918c
+ {
195918c
+ 	cout << "a"
195918c
+ 	<< "b"
195918c
+ 	<< ") :"
195918c
+ 	<< "c";
195918c
+ }
195918c
+ 
195918c
+ STARTTEST
195918c
  :g/^STARTTEST/.,/^ENDTEST/d
195918c
  :1;/start of AUTO/,$wq! test.out
195918c
  ENDTEST
195918c
*** ../vim-7.3.178/src/testdir/test3.ok	2011-05-10 11:39:13.000000000 +0200
195918c
--- src/testdir/test3.ok	2011-05-10 11:50:14.000000000 +0200
195918c
***************
195918c
*** 1216,1218 ****
195918c
--- 1216,1227 ----
195918c
  	printf("Foo!\n");
195918c
  }
195918c
  
195918c
+ 
195918c
+ void func(void)
195918c
+ {
195918c
+ 	cout << "a"
195918c
+ 		<< "b"
195918c
+ 		<< ") :"
195918c
+ 		<< "c";
195918c
+ }
195918c
+ 
195918c
*** ../vim-7.3.178/src/version.c	2011-05-10 11:39:13.000000000 +0200
195918c
--- src/version.c	2011-05-10 11:53:36.000000000 +0200
195918c
***************
195918c
*** 716,717 ****
195918c
--- 716,719 ----
195918c
  {   /* Add new patch number below this line */
195918c
+ /**/
195918c
+     179,
195918c
  /**/
195918c
195918c
-- 
195918c
hundred-and-one symptoms of being an internet addict:
195918c
71. You wonder how people walk
195918c
195918c
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
195918c
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
195918c
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
195918c
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///