Skip to content

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

@GoogleCodeExporter

Description

@GoogleCodeExporter
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 [email protected] on 24 May 2011 at 10:09

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions