Hi

2015-10-7 (Wed) 10:26:08 UTC+9 h_east:
> Hi James and Bram,
> 
> 2015-10-4 (Sun) 22:29:23 UTC+9 h_east:
> > Hi James!
> > 
> > 2015-8-2 (Sun) 13:46:34 UTC+9 James McCoy:
> > > Given the file foo.cc
> > > 
> > > -- >8 --
> > > class a {
> > >   public:
> > >           a() : i(0)
> > >           {
> > >           }
> > > 
> > >           a()
> > >                   : i(0)
> > >           {
> > >           }
> > > 
> > >           a() : i(0) {
> > >           }
> > > };
> > > -- 8< --
> > > 
> > > Performing '=G' from line 1 results in
> > > 
> > > -- >8 --
> > > class a {
> > >   public:
> > >           a() : i(0)
> > >   {
> > >   }
> > > 
> > >           a()
> > >                   : i(0)
> > >           {
> > >           }
> > > 
> > >           a() : i(0) {
> > >           }
> > > };
> > > -- 8< --
> > > 
> > > The block of the constructor on line 3 gets dedented when it shouldn't.
> > > The backtracking to find the start of the constructor, so it can be used
> > > as the basis for indenting the block, finds the scope declaration and
> > > keys off of that instead.
> > > 
> > > The cindent code is pretty hairy.  I wasn't able to find an obvious fix.
> > 
> > I can reproduce it.
> > And began to investigate.
> > Perhaps I would fix this problem.
> > 
> > Please wait a week.
> 
> I got it!
> 
> Please confirm an attached patch. (Contains test)

Oops, this patch makes another problem.

The following Issue will further badly.
https://github.com/vim/vim/issues/38

#v+
void func()
{
        switch (foo)
        {
                case (bar):
                        if (baz())
                        quux(); // FIXME: this line should be indented more!
                        break;
                case (shmoo):
                        if (!bar)
{ // FIXME: this brace is indented too little
}
case (foo1):
        switch (bar)
{ // FIXME: this brace is indented too little
        case baz:
                baz_f();
                break;
}
break;
default:
baz();
baz();
break;
}
}
#v-

I will investigate next weekend.
--
Best regards,
Hirohito Higashi (a.k.a h_east)

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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui