simpc-mode
simpc-mode copied to clipboard
Fix indentation for case labels
Case labels are indented in a strange way, so I fixed it.
Previous behavior:
switch (x) {
case 10:
printf("x is 10!\n");
break;
default:
printf("x is not 10 :(\n");
break;
}
Updated behavior:
switch (x) {
case 10:
printf("x is 10!\n");
break;
default:
printf("x is not 10 :(\n");
break;
}
It is tested to work with multiple labels with fallthrough as well:
switch (x) {
case 1:
case 2:
case 3:
break;
}