check previous element for error too

#WEB-20597 fixed
#WEB-20633 fixed
This commit is contained in:
Dennis Ushakov
2016-03-18 17:24:32 +03:00
parent af3340346b
commit 068f7fb2e6
@@ -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) {