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.
--
Best regards,
Hirohito Higashi (a.k.a h_east)
2015-10-7 (Wed) 10:26:08 UTC+9 h_east:
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.
2015-10-12 (Mon) 0:18:12 UTC+9 h_east:
Bram>
Thanks for fix above problem.
Patch 7.4.893
https://groups.google.com/d/msg/vim_dev/9-mLe9urjeg/NJqaLAe-CgAJ
I update this issue's patch.
I confirmed test results is ALL DONE.
2016-3-31(Thu) 13:16:30 UTC+9 James McCoy:
> On Tue, Oct 13, 2015 at 05:24:19PM -0700, h_east wrote:
> > Bram>
> > Thanks for fix above problem.
> > Patch 7.4.893
> > https://groups.google.com/d/msg/vim_dev/9-mLe9urjeg/NJqaLAe-CgAJ
> >
> > I update this issue's patch.
> > I confirmed test results is ALL DONE.
>
> It looks like this was never included and I don't see mention of it in
> the todo list.
[...]
Yeah, Thank you for reminding me about this :-)
I update a patch.
--
Best regards,
Hirohito Higashi (a.k.a. h_east)