enter handler for closable block
authorMaxim Medvedev <maxim.medvedev@jetbrains.com>
Sat, 27 Nov 2010 11:35:16 +0000 (14:35 +0300)
committerMaxim Medvedev <maxim.medvedev@jetbrains.com>
Sat, 27 Nov 2010 11:35:16 +0000 (14:35 +0300)
plugins/groovy/src/org/jetbrains/plugins/groovy/lang/editor/actions/GroovyEnterHandler.java

index 8af04c2e6a70b52c02a56776878de3e145815983..9f55d8b9ea61fe440333f9758805d672ac41aeda 100644 (file)
@@ -87,7 +87,7 @@ public class GroovyEnterHandler implements EnterHandlerDelegate {
         if (element != null &&
             element.getNode().getElementType() == mRCURLY &&
             element.getParent() instanceof GrClosableBlock &&
-            text.length() > caret) {
+            text.length() > caret && afterArrow) {
           return Result.DefaultForceIndent;
         }
       }