On 25-Apr-2011 Zvezdan Petkovic <[email protected]> wrote:
> On Mon, Apr 25, 2011 at 05:25:43PM +0200, Lech Lorens wrote:
> > ... the real issue was with the following piece of code (which follows
> > the coding style assumed during the development of Vim):
> > 
> > #v+
> > /* comment */
> > void
> >         func(int a
> > #if defined(FOO)
> >               , int b
> >               , int c
> > #endif
> >              )
> > {
> > }
> > #v-
> 
> 
> I agree.
> This looks like a bug.
> With "ts" in cinoptions, "void" should be indented, not "func".
> 
> 
> > 
> > which looks much better when indented as follows:
> > 
> > #v+
> > /* comment */
> > void
> > func(int a
> > #if defined(FOO)
> >      , int b
> >      , int c
> > #endif
> >     )
> > {
> > }
> > #v-
> 
> 
> I agree that it looks better.
> To get this indentation set your cinoptions=(0,t0
> No need for a patch, if that's all you want.

OK, my patch does not address the two issues that this example shows. It 
only addresses the one issue that bothered me more. It doesn't break any 
other functionality so it's good enough for me.

> > While after applying my patch Vim's behaviour is still imperfect, I'd 
> > argue that it's better.
> 
> 
> If I understand correctly, your patch assumes that:
> 
> 1. The problem is caused by the pre-processing directive.
> 2. The "ts" option keeps return type in the first column.

No, the other statement is not mine.
My patch only fixes the problem with the function name being incorrectly 
indented.

-- 
Cheers,
Lech

-- 
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

Raspunde prin e-mail lui