Auto format not formatting correctly

This is really low priority, but it's not 'nice':

If you declare an array like this:

static boolean States[][4] = {{1,0,1,0},{0,0,1,0},{0,1,1,0},{0,1,0,0},{0,1,0,1},{0,0,0,1},{1,0,0,1},{1,0,0,0}};

And then run auto format you'll get this:

static boolean States[][4] = {
  {
    1,0,1,0  }
  ,{
    0,0,1,0  }
  ,{
    0,1,1,0  }
  ,{
    0,1,0,0  }
  ,{
    0,1,0,1  }
  ,{
    0,0,0,1  }
  ,{
    1,0,0,1  }
  ,{
    1,0,0,0  }
};

Which is pretty good, although not what I would expect.
Problem is that if you run auto format repeatedly to keep your code formatted right (like I do) you'll eventually end up with something like this:

static boolean States[][4] = {
  {
    1,0,1,0                                              }
  ,{
    0,0,1,0                                              }
  ,{
    0,1,1,0                                              }
  ,{
    0,1,0,0                                              }
  ,{
    0,1,0,1                                              }
  ,{
    0,0,0,1                                              }
  ,{
    1,0,0,1                                              }
  ,{
    1,0,0,0                                              }
};

After a few programming sessions the closing } will disappear from your window.

John

Yes, I had noticed that, however I do not autoformat very often at all...

I presume you were expecting what should happen which is:

static boolean States[][4] = {
  {
    1,0,1,0                                              
}
  ,{
    0,0,1,0                                              
}
  ,{
    0,1,1,0                                              
}
  ,{
    0,1,0,0                                              
}
  ,{
    0,1,0,1                                              
}
  ,{
    0,0,0,1                                              
}
  ,{
    1,0,0,1                                              
}
  ,{
    1,0,0,0                                              
}
};

or something similar

Mowcius

If I could choose I would like something like this:

static boolean States[][4] = {
    {1, 0, 1, 0},
    {0, 0, 1, 0},
    {0, 1, 1, 0},
    {0, 1, 0, 0},
    {0, 1, 0, 1},
    {0, 0, 0, 1},
    {1, 0, 0, 1},
    {1, 0, 0, 0}
};

But whatever formatting the Auto Format chooses, it should not change when repeatedly called.

John

Yes that is probably better...

Definitely a bug to be sorted...

Mowcius