From 24da6d9cb5720a2a1d60e08c22e11ca710fba368 Mon Sep 17 00:00:00 2001 From: Dmitry Batrak Date: Wed, 21 Jan 2015 10:54:25 +0300 Subject: [PATCH] IDEA-135341 Uncomment action removes a space after a comment prefix which ends with a space. --- .../generation/CommentByLineCommentHandler.java | 7 ------- 1 file changed, 7 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/codeInsight/generation/CommentByLineCommentHandler.java b/platform/lang-impl/src/com/intellij/codeInsight/generation/CommentByLineCommentHandler.java index c545a64ff160..6ef0d786102d 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/generation/CommentByLineCommentHandler.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/generation/CommentByLineCommentHandler.java @@ -555,13 +555,6 @@ public class CommentByLineCommentHandler extends MultiCaretCodeInsightActionHand assert commented; int charsToDelete = matchesTrimmed ? prefix.trim().length() : prefix.length(); - int theEnd = endOffset > 0 ? endOffset : chars.length(); - // if there's exactly one space after line comment prefix and before the text that follows in the same line, delete the space too - if (startOffset + charsToDelete < theEnd - 1 && chars.charAt(startOffset + charsToDelete) == ' ') { - if (startOffset + charsToDelete == theEnd - 2 || chars.charAt(startOffset + charsToDelete + 1) != ' ') { - charsToDelete++; - } - } document.deleteString(startOffset, startOffset + charsToDelete); return true; }