diff --git a/platform/lang-impl/src/com/intellij/codeInsight/editorActions/EnterHandler.java b/platform/lang-impl/src/com/intellij/codeInsight/editorActions/EnterHandler.java index 38d562937c61..02e983f79b84 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/editorActions/EnterHandler.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/editorActions/EnterHandler.java @@ -282,7 +282,7 @@ public class EnterHandler extends BaseEnterHandler { return true; } } - return false; + return base.getPrevSibling() instanceof PsiErrorElement; } private static boolean isDocComment(final PsiElement element, final CodeDocumentationAwareCommenter commenter) {