1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-11 04:52:21 +02:00

Fixed freeze during OpenCodeBlock

This commit is contained in:
Brian Fiete 2020-11-03 05:25:53 -08:00
parent 4badc6eede
commit 6302b5e247

View file

@ -1923,7 +1923,10 @@ namespace IDE.ui
if (mayBeExpr) if (mayBeExpr)
{ {
if (prevC.IsWhiteSpace) if (prevC.IsWhiteSpace)
{
checkIdx--;
continue; continue;
}
if ((prevC == '(') || (prevC == ')') || (prevC == '{') || (prevC == '}')) if ((prevC == '(') || (prevC == ')') || (prevC == '{') || (prevC == '}'))
{ {
mayBeExpr = false; mayBeExpr = false;
@ -1933,6 +1936,7 @@ namespace IDE.ui
if ((prevC == 'r') && (displayType == .Keyword)) if ((prevC == 'r') && (displayType == .Keyword))
{ {
// operator overload // operator overload
checkIdx--;
mayBeExpr = false; mayBeExpr = false;
continue; continue;
} }
@ -1955,7 +1959,7 @@ namespace IDE.ui
break; break;
} }
} }
if (prevC == '{') if ((prevC == '{') || (prevC == '}'))
break; break;
if (parenOpenCount == 0) if (parenOpenCount == 0)
{ {