IDEA-199695 XML commenter should place the block comment prefix at the beginning of the line when commenting out a line

This commit is contained in:
Dmitry Avdeev
2018-11-08 15:07:16 +03:00
parent ceb6bb5a28
commit 1dcf5d3da3
@@ -651,7 +651,6 @@ public class CommentByLineCommentHandler extends MultiCaretCodeInsightActionHand
if (endOffset == offset && block.startLine != block.endLine) return true;
final int textLength = document.getTextLength();
final CharSequence chars = document.getCharsSequence();
offset = CharArrayUtil.shiftForward(chars, offset, " \t");
if (endOffset == textLength) {
final int shifted = CharArrayUtil.shiftBackward(chars, textLength - 1, " \t") + 1;
if (shifted < textLength) endOffset = shifted;