aBothe / Mono-D

D Add-In for MonoDevelop
http://wiki.dlang.org/Mono-D
Other
113 stars 26 forks source link

wrong indentation level at public block #503

Closed zhaopuming closed 10 years ago

zhaopuming commented 10 years ago

when using public blocks instead of public:, the indentation level is wrong in the block.

class Command
{
public {
    string name; // press enter here
        string[] args; // gives wrong indentation level; 
}
}
zhaopuming commented 10 years ago

never mind, I changed public: to public { directly, hence the indentation level of public { is wrong actually. So there is no problem here.

aBothe commented 10 years ago

Is it incosistently indented inside the public { } ? I.e. is the name-indent unequal compared to the args-indent? If so, then this was a bug. Otherwise, it's just my opinion that {}-surrounded blocks should be indented in general :-D

zhaopuming commented 10 years ago

You are right, public { } should be indented, after a format code every things is fine:

class Command
{
    public {
        string name; // press enter here
        string[] args; // gives wrong indentation level; 
    }
}

there is no bug