From 068f7fb2e64b0284d51d8af17f5c79eaac381c63 Mon Sep 17 00:00:00 2001 From: Dennis Ushakov Date: Fri, 18 Mar 2016 16:28:00 +0300 Subject: [PATCH] check previous element for error too #WEB-20597 fixed #WEB-20633 fixed --- .../com/intellij/codeInsight/editorActions/EnterHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {