timonwong / SublimeAStyleFormatter

SublimeAStyleFormatter is a code formatter/beautifier for Sublime Text 2 & 3. It provides ability to format C/C++/C#/Java files.
MIT License
284 stars 43 forks source link

structs declared using designated initializers are further indented with each element #40

Open Lotterleben opened 10 years ago

Lotterleben commented 10 years ago

Hi, when formatting my files with your plugin, it makes my structs declared with designated initializers go from looking like this:

*rerrd = (struct rerr_data)
{
    .unreachable_nodes = unreachable_nodes,
    .len = len,
    .hoplimit = AODVV2_MAX_HOPCOUNT,
    .next_hop = next_hop
};

to looking like this:

*rerrd = (struct rerr_data)
{
    .unreachable_nodes = unreachable_nodes,
     .len = len,
      .hoplimit = AODVV2_MAX_HOPCOUNT,
       .next_hop = next_hop
};

That doesn't look right to me, could this be a bug?

mintisan commented 9 years ago

maybe its a bug, but a cute one :D

Lotterleben commented 9 years ago

Why cute? :D