Want to preserve comment on same line as statement when formatting code

If I have a line liks this:    some statement.................; //some comment

and I do  'reformat code', the line becomes:

some statement..................;
          //the comment

it puts the comment on its own line. This happens when the statement is larger than some character count. There's more than enough space for the statement and comment. What is affecting the formatting here?

Please sign in to leave a comment.