comments moved to previous line when performing re-format
When I perform a re-format action where there are comments on the line(s) between lines of code, the first line of the comment is always moved to the end of the previous line of code. I've messed with line spacing, carriage return settings, and other settings, and can't seem to find a way to prevent this behavior. What am I doing wrong? Thanks in advance.
Example:
before:
```
else { /* Neither are set. */ /* We cannot accept this. */ newret = CONFNAK; /* Give the peer our idea of what can be used, so it can choose and confirm */ pcb.ccp_hisoptions.mppe = pcb.ccp_allowoptions.mppe; } /* rebuild the opts */ mppe_opts_to_ci(pcb.ccp_hisoptions.mppe, pkt.data() + 2); if (newret == CONFACK) {
```
after:
```
else { /* Neither are set. */ /* We cannot accept this. */ newret = CONFNAK; /* Give the peer our idea of what can be used, so it can choose and confirm */ pcb.ccp_hisoptions.mppe = pcb.ccp_allowoptions.mppe; } /* rebuild the opts */ mppe_opts_to_ci(pcb.ccp_hisoptions.mppe, pkt.data() + 2); if (newret == CONFACK) {
```
Please sign in to leave a comment.
Hello,
This is probably a bug. Could you please create a standalone snippet of code which reproduces the issue? I don't get the same behavior on 2019.2 if I reformat the following code:
To provide further information, I've discovered if I set "C++"->"Formatting Style"->"Spaces"->"Other"->"Preserve space before end of line comment" to true, then this problem does not occur. Otherwise any block of code with comments will cause this issue for me.
With that option set to false, this snippet re-produces the issue for me:
```
```
Thanks a lot, we can reproduce the problem. This issue will be tracked in https://youtrack.jetbrains.com/issue/RSCPP-27513. Please keep "Preserve space before end of line comment" set to true as a workaround for now.
thanks for your help I appreciate it.