Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
GoogleCodeExporter opened this issue Aug 18, 2015 · 0 comments
Open

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

GoogleCodeExporter opened this issue Aug 18, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

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

zdohnal added a commit to zdohnal/vim that referenced this issue Feb 6, 2017
brammool referenced this issue Nov 10, 2018
Problem:    Reloading a script gives errors for existing functions.
Solution:   Allow redefining a function once when reloading a script.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant