mirror of
https://github.com/vim/vim.git
synced 2025-10-27 09:24:23 -04:00
updated for version 7.3.249
Problem: Wrong indenting for array initializer. Solution: Detect '}' in a better way. (Lech Lorens)
This commit is contained in:
@@ -1450,6 +1450,36 @@ void func3(void)
|
||||
int tab[] = {
|
||||
1, 2,
|
||||
3, 4,
|
||||
5, 6};
|
||||
|
||||
printf("Don't you dare indent this line incorrectly!\n);
|
||||
}
|
||||
|
||||
STARTTEST
|
||||
:set cino&
|
||||
:set cino+=l1
|
||||
2kdd=][
|
||||
ENDTEST
|
||||
|
||||
void func(void)
|
||||
{
|
||||
int tab[] =
|
||||
{
|
||||
1, 2, 3,
|
||||
4, 5, 6};
|
||||
|
||||
printf("Indent this line correctly!\n");
|
||||
|
||||
switch (foo)
|
||||
{
|
||||
case bar:
|
||||
printf("bar");
|
||||
break;
|
||||
case baz: {
|
||||
printf("baz");
|
||||
break;
|
||||
}
|
||||
case quux:
|
||||
printf("But don't break the indentation of this instruction\n");
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1308,6 +1308,31 @@ void func3(void)
|
||||
}
|
||||
|
||||
|
||||
void func(void)
|
||||
{
|
||||
int tab[] =
|
||||
{
|
||||
1, 2, 3,
|
||||
4, 5, 6};
|
||||
|
||||
printf("Indent this line correctly!\n");
|
||||
|
||||
switch (foo)
|
||||
{
|
||||
case bar:
|
||||
printf("bar");
|
||||
break;
|
||||
case baz: {
|
||||
printf("baz");
|
||||
break;
|
||||
}
|
||||
case quux:
|
||||
printf("But don't break the indentation of this instruction\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void func(void)
|
||||
{
|
||||
cout << "a"
|
||||
|
||||
Reference in New Issue
Block a user