From b48956499715c8ee3e8b25b7f4ab7b657d4978f1 Mon Sep 17 00:00:00 2001 From: Yuri Date: Fri, 20 Jul 2012 18:15:35 +0400 Subject: [PATCH] #RUBY-11590 fixed --- .../generation/CommentByBlockCommentHandler.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/platform/lang-impl/src/com/intellij/codeInsight/generation/CommentByBlockCommentHandler.java b/platform/lang-impl/src/com/intellij/codeInsight/generation/CommentByBlockCommentHandler.java index 3325c4f1d27c..6a879e9000b2 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/generation/CommentByBlockCommentHandler.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/generation/CommentByBlockCommentHandler.java @@ -151,6 +151,12 @@ public class CommentByBlockCommentHandler implements CodeInsightActionHandler { else if (selectionModel.hasSelection()) { int selectionStart = selectionModel.getSelectionStart(); int selectionEnd = selectionModel.getSelectionEnd(); + if (commenter instanceof IndentedCommenter) { + final Boolean value = ((IndentedCommenter)commenter).forceIndentedLineComment(); + if (value != null && value == Boolean.TRUE) { + selectionStart = myDocument.getLineStartOffset(myDocument.getLineNumber(selectionStart)); + } + } commentRange(selectionStart, selectionEnd, prefix, suffix, commenter); } else {