lalitmetkar / vim

Automatically exported from code.google.com/p/vim
0 stars 0 forks source link

C indenting: enclosing case values in switch construct causes wrong indentation #38

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
In the following example some lines are indented too little:

#v+
void func()
{
    switch (foo)
    {
        case (bar):
            if (baz())
            quux(); // FIXME: this line should be indented more!
            break;
        case (shmoo):
            if (!bar)
        { // FIXME: this brace is indented too little
        }
        case (foo1):
            switch (bar)
        { // FIXME: this brace is indented too little
            case baz:
                baz_f();
                break;
        }
            break;
        default:
            baz();
            baz();
            break;
    }
}
#v-

Original issue reported on code.google.com by lech.lor...@gmail.com on 13 Dec 2011 at 10:10