Try indenting a file with the following contents:
#v+
// vim: cindent et
void func(void)
{
int a[] =
{
1, 2,
3, 4};
printf("This is indented too much!\n");
}
#v-
Currently Vim indents printf too much:
#v+
// vim: cindent et
void func(void)
{
int a[] =
{
1, 2,
3, 4};
printf("This is indented too much!\n");
}
#v-
I am attaching a patch which fixes the problem. The patch also contains a test
for the situation described above. While trying to fix the problem at one point
I caused Vim to behave incorrectly while indenting a switch block. The
incorrect behaviour was not detected by the test suite so I am also adding a
test for switch.
Original issue reported on code.google.com by lech.lor...@gmail.com on 12 Jun 2011 at 11:32
Original issue reported on code.google.com by
lech.lor...@gmail.com
on 12 Jun 2011 at 11:32Attachments: