Lech Lorens wrote: > Status: New > Owner: ---- > Labels: Type-Defect Priority-Medium > > New issue 10 by [email protected]: [patch] cindent: array contents > followed by a closing brace and a semicolon confuses the indenter > http://code.google.com/p/vim/issues/detail?id=10 > > 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. > > Attachments: > c-indent-array-contents-brace-semicolon.patch 1.6 KB
Thanks Lech, I'll put it on my todo list. -- hundred-and-one symptoms of being an internet addict: 168. You have your own domain name. /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
