search for error elements through all siblings

#WEB-13313 fixed
This commit is contained in:
Dennis Ushakov
2016-01-13 14:01:34 +03:00
parent 158d3bcf0b
commit e42e970f27
@@ -278,8 +278,8 @@ public class EnterHandler extends BaseEnterHandler {
*/
private static boolean isInvalidPsi(@NotNull PsiElement base) {
for (PsiElement current = base.getNextSibling(); current != null; current = current.getNextSibling()) {
if (current.getTextLength() != 0) {
return current instanceof PsiErrorElement;
if (current instanceof PsiErrorElement) {
return true;
}
}
return false;