xiancode / vim

Automatically exported from code.google.com/p/vim
0 stars 0 forks source link

C indenting: "):" in comment confuses the indenter #4

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
With 'cino' set to "(0,l1,Ws" the following C code gets indented incorrectly:
- foo2a(void) is indented too much,
- foo2b(void) is indented too much but by a different amount.

This happens for me in Vim 7.3.189.

/* some comment */
        int
foo1(void)
{
        bar();
}

/* some comment
 * ): */
        int
        foo2a(void)
{
        bar();
}

/* some comment
 * ):
 * and even some more. */
        int
          foo2b(void)
{
        bar();
}
/* some comment
 * : */
        int
foo3a(void)
{
        bar();
}

/* some comment
 * :
 * and even some more. */
        int
foo3b(void)
{
        bar();
}

Original issue reported on code.google.com by lech.lor...@gmail.com on 24 May 2011 at 10:09