From 6302b5e2475af75148843fcd344eb6655d9f434c Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Tue, 3 Nov 2020 05:25:53 -0800 Subject: [PATCH] Fixed freeze during OpenCodeBlock --- IDE/src/ui/SourceEditWidgetContent.bf | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/IDE/src/ui/SourceEditWidgetContent.bf b/IDE/src/ui/SourceEditWidgetContent.bf index de7244c1..96fc7584 100644 --- a/IDE/src/ui/SourceEditWidgetContent.bf +++ b/IDE/src/ui/SourceEditWidgetContent.bf @@ -1923,7 +1923,10 @@ namespace IDE.ui if (mayBeExpr) { if (prevC.IsWhiteSpace) + { + checkIdx--; continue; + } if ((prevC == '(') || (prevC == ')') || (prevC == '{') || (prevC == '}')) { mayBeExpr = false; @@ -1933,6 +1936,7 @@ namespace IDE.ui if ((prevC == 'r') && (displayType == .Keyword)) { // operator overload + checkIdx--; mayBeExpr = false; continue; } @@ -1955,7 +1959,7 @@ namespace IDE.ui break; } } - if (prevC == '{') + if ((prevC == '{') || (prevC == '}')) break; if (parenOpenCount == 0) {