1
0
forked from aniani/vim

patch 7.4.893

Problem:    C indenting is wrong below a "case (foo):" because it is
            recognized as a C++ base class construct.  Issue #38.
Solution:   Check for the case keyword.
This commit is contained in:
Bram Moolenaar
2015-10-13 16:13:39 +02:00
parent 9d6ca1cc5e
commit d1b15dec4d
4 changed files with 64 additions and 1 deletions

View File

@@ -932,6 +932,33 @@ if (1)
a = 1;
}
void func()
{
switch (foo)
{
case (bar):
if (baz())
quux();
break;
case (shmoo):
if (!bar)
{
}
case (foo1):
switch (bar)
{
case baz:
baz_f();
break;
}
break;
default:
baz();
baz();
break;
}
}
/* end of AUTO */
STARTTEST

View File

@@ -920,6 +920,33 @@ void getstring() {
a = 1;
}
void func()
{
switch (foo)
{
case (bar):
if (baz())
quux();
break;
case (shmoo):
if (!bar)
{
}
case (foo1):
switch (bar)
{
case baz:
baz_f();
break;
}
break;
default:
baz();
baz();
break;
}
}
/* end of AUTO */