mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-135341 Uncomment action removes a space after a comment prefix which ends with a space.
This commit is contained in:
-7
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user