# HG changeset patch # User Bram Moolenaar # Date 1305021390 -7200 # Node ID 11e62fb6f8154537f92be5f278c31e737247f781 # Parent 27b142f1f4346251e61926cf4ca3fa36ef7c6c0c updated for version 7.3.179 Problem: C-indent doesn't handle colon in string correctly. Solution: Skip the string. (Lech Lorens) diff --git a/src/misc1.c b/src/misc1.c --- a/src/misc1.c +++ b/src/misc1.c @@ -5801,7 +5801,9 @@ cin_is_cpp_baseclass(col) continue; } - if (s[0] == ':') + if (s[0] == '"') + s = skip_string(s) + 1; + else if (s[0] == ':') { if (s[1] == ':') { diff --git a/src/testdir/test3.in b/src/testdir/test3.in --- a/src/testdir/test3.in +++ b/src/testdir/test3.in @@ -1360,6 +1360,19 @@ void func(void) } STARTTEST +:set cino& +2kdd=][ +ENDTEST + +void func(void) +{ + cout << "a" + << "b" + << ") :" + << "c"; +} + +STARTTEST :g/^STARTTEST/.,/^ENDTEST/d :1;/start of AUTO/,$wq! test.out ENDTEST diff --git a/src/testdir/test3.ok b/src/testdir/test3.ok --- a/src/testdir/test3.ok +++ b/src/testdir/test3.ok @@ -1216,3 +1216,12 @@ void func(void) printf("Foo!\n"); } + +void func(void) +{ + cout << "a" + << "b" + << ") :" + << "c"; +} + diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -715,6 +715,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 179, +/**/ 178, /**/ 177,