1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-16 07:14:09 +02:00

Fixed autocomplete flashing issues

This commit is contained in:
Brian Fiete 2020-08-03 07:26:36 -07:00
parent f9bed24c00
commit 99c7a9fe1f
2 changed files with 10 additions and 6 deletions

View file

@ -534,8 +534,6 @@ namespace IDE.ui
int windowHeight = (int)(mWantHeight + Math.Max(0, mDocHeight - GS!(32)));
Debug.WriteLine("Updating {} {}", windowWidth, mRightBoxAdjust);
mIgnoreMove++;
if (mAutoComplete.mInvokeWidget != null)
mAutoComplete.mInvokeWidget.mIgnoreMove++;

View file

@ -10424,6 +10424,8 @@ BfLambdaInstance* BfExprEvaluator::GetLambdaInstance(BfLambdaBindExpression* lam
{
String paramName = invokeMethodInstance->GetParamName(paramIdx);
autoComplete->mEntriesSet.Clear();
if (paramName.IsEmpty())
paramName += StrFormat("val%d", paramIdx + 1);
autoComplete->AddEntry(AutoCompleteEntry("paramName", paramName));
autoComplete->mInsertStartIdx = cursorIdx;
autoComplete->mInsertEndIdx = cursorIdx;
@ -10435,7 +10437,10 @@ BfLambdaInstance* BfExprEvaluator::GetLambdaInstance(BfLambdaBindExpression* lam
{
if (!totalNames.IsEmpty())
totalNames += ", ";
totalNames += invokeMethodInstance->GetParamName(checkIdx);
String paramName = invokeMethodInstance->GetParamName(checkIdx);
if (paramName.IsEmpty())
paramName += StrFormat("val%d", checkIdx + 1);
totalNames += paramName;
}
autoComplete->AddEntry(AutoCompleteEntry("paramNames", totalNames));
}
@ -12186,9 +12191,10 @@ void BfExprEvaluator::Visit(BfObjectCreateExpression* objCreateExpr)
BfResolvedArgs resolvedArgs;
if (autoComplete != NULL)
auto rawAutoComplete = mModule->mCompiler->GetAutoComplete();
if (rawAutoComplete != NULL)
{
SetAndRestoreValue<bool> prevCapturing(autoComplete->mIsCapturingMethodMatchInfo, false);
SetAndRestoreValue<bool> prevCapturing(rawAutoComplete->mIsCapturingMethodMatchInfo, false);
MatchConstructor(refNode, objCreateExpr, arrayValue, arrayType, resolvedArgs, false, false);
}
else