Block comments not being reformatted/realigned on changes?
Whenever I add curly brackets around a section of code, or remove them, or paste a block of code from the clipboard. I've noticed the block comments are not being realigned with the code. The block comments retain their indents whereas the code is reindented. This is only block comments, inline comments are realigned correctly.
Seem to be spending a lot of time manually correcting the indents of modified block comments.
Any idea what code style setting this might be. I've only really noticed it the past few weeks, feels like something changed fairly recently (currently using 14.1.4).
请先登录再写评论。
Does it happen in Java code? Please provide a file to reproduce.
Yes any Java files. e.g.
If I select the block comment and code (lines 5-8) copy, then at the bottom of the class. Hit return at end of sampleMethod3(); (so I get a newline) then paste I get:
If instead I was to manually insert a block around lines 5-8 by adding curly braces I get this instead (note the block comment doesn't move, unlike the code):
Seems removing this block (by removing the curly braces again) doesn't cause a similar reformat. Not for blocks, single line comments nor code. Can't remember if it ever did.
Somwhat contrived examples but these kinds of things.
Thanks for the details, please vote for https://youtrack.jetbrains.com/issue/IDEA-140177 .