File tree Expand file tree Collapse file tree 4 files changed +58
-2
lines changed
Expand file tree Collapse file tree 4 files changed +58
-2
lines changed Original file line number Diff line number Diff line change @@ -7945,8 +7945,7 @@ get_c_indent()
79457945 * If we're at the end of a block, skip to the start of
79467946 * that block.
79477947 */
7948- curwin -> w_cursor .col = 0 ;
7949- if (* cin_skipcomment (l ) == '}'
7948+ if (find_last_paren (l , '{' , '}' )
79507949 && (trypos = find_start_brace (ind_maxcomment ))
79517950 != NULL ) /* XXX */
79527951 {
Original file line number Diff line number Diff line change @@ -1450,6 +1450,36 @@ void func3(void)
14501450printf("Don't you dare indent this line incorrectly!\n);
14511451}
14521452
1453+ STARTTEST
1454+ :set cino&
1455+ :set cino+=l1
1456+ 2kdd=][
1457+ ENDTEST
1458+
1459+ void func(void)
1460+ {
1461+ int tab[] =
1462+ {
1463+ 1, 2, 3,
1464+ 4, 5, 6};
1465+
1466+ printf("Indent this line correctly!\n");
1467+
1468+ switch (foo)
1469+ {
1470+ case bar:
1471+ printf("bar");
1472+ break;
1473+ case baz: {
1474+ printf("baz");
1475+ break;
1476+ }
1477+ case quux:
1478+ printf("But don't break the indentation of this instruction\n");
1479+ break;
1480+ }
1481+ }
1482+
14531483STARTTEST
14541484:set cino&
145514852kdd=][
Original file line number Diff line number Diff line change @@ -1308,6 +1308,31 @@ void func3(void)
13081308}
13091309
13101310
1311+ void func(void)
1312+ {
1313+ int tab[] =
1314+ {
1315+ 1, 2, 3,
1316+ 4, 5, 6};
1317+
1318+ printf("Indent this line correctly!\n");
1319+
1320+ switch (foo)
1321+ {
1322+ case bar:
1323+ printf("bar");
1324+ break;
1325+ case baz: {
1326+ printf("baz");
1327+ break;
1328+ }
1329+ case quux:
1330+ printf("But don't break the indentation of this instruction\n");
1331+ break;
1332+ }
1333+ }
1334+
1335+
13111336void func(void)
13121337{
13131338 cout << "a"
Original file line number Diff line number Diff line change @@ -709,6 +709,8 @@ static char *(features[]) =
709709
710710static int included_patches [] =
711711{ /* Add new patch number below this line */
712+ /**/
713+ 249 ,
712714/**/
713715 248 ,
714716/**/
You can’t perform that action at this time.
0 commit comments