From aede6ceba3030db559f503268be9cad75a08ca39 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 10 May 2011 11:56:30 +0200 Subject: [PATCH] updated for version 7.3.179 Problem: C-indent doesn't handle colon in string correctly. Solution: Skip the string. (Lech Lorens) --- src/misc1.c | 4 +++- src/testdir/test3.in | 13 +++++++++++++ src/testdir/test3.ok | 9 +++++++++ src/version.c | 2 ++ 4 files changed, 27 insertions(+), 1 deletion(-) diff --git a/src/misc1.c b/src/misc1.c index 3a94c3c2b..a5c4607e3 100644 --- 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 index 8576e275a..e4c699394 100644 --- a/src/testdir/test3.in +++ b/src/testdir/test3.in @@ -1359,6 +1359,19 @@ void func(void) printf("Foo!\n"); } +STARTTEST +:set cino& +2kdd=][ +ENDTEST + +void func(void) +{ + cout << "a" + << "b" + << ") :" + << "c"; +} + STARTTEST :g/^STARTTEST/.,/^ENDTEST/d :1;/start of AUTO/,$wq! test.out diff --git a/src/testdir/test3.ok b/src/testdir/test3.ok index 3764453a7..39b485950 100644 --- 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 index f69bf4e9e..2713ffc43 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 179, /**/ 178, /**/ -- 2.40.0