1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

Fixed autocomplete for lambda param names

This commit is contained in:
Brian Fiete 2022-11-16 13:55:33 -08:00
parent 7dfb279e48
commit 6045137bce
4 changed files with 18 additions and 6 deletions

View file

@ -514,6 +514,9 @@ namespace IDE.ui
public void UpdateWidth()
{
if (mWidgetWindow == null)
return;
int firstEntry = (int)(-(int)mScrollContent.mY / mItemSpacing);
int lastEntry = (int)((-(int)mScrollContent.mY + mScrollContentContainer.mHeight) / mItemSpacing);

View file

@ -115,16 +115,16 @@ namespace IDE.ui
}
}
/*public this()
public this()
{
Debug.WriteLine("SymbolReferenceHelper this {0}", this);
//Debug.WriteLine("SymbolReferenceHelper this {0}", this);
}
public ~this()
{
Debug.WriteLine("SymbolReferenceHelper ~this {0}", this);
}*/
//Debug.WriteLine("SymbolReferenceHelper ~this {0}", this);
}
public void Init(SourceViewPanel sourceViewPanel, Kind kind)
{

View file

@ -5211,7 +5211,7 @@ namespace IDE.ui
public override void InsertText(int index, String text)
{
if (IDEApp.sApp.mSymbolReferenceHelper != null)
if ((IDEApp.sApp.mSymbolReferenceHelper != null) && (mSourceViewPanel != null))
IDEApp.sApp.mSymbolReferenceHelper.SourcePreInsertText(this, index, text);
for (var persistentTextPosition in PersistentTextPositions)

View file

@ -14030,7 +14030,16 @@ BfLambdaInstance* BfExprEvaluator::GetLambdaInstance(BfLambdaBindExpression* lam
{
wasCapturingMethodInfo = autoComplete->mIsCapturingMethodMatchInfo;
if (autoComplete->IsAutocompleteNode(lambdaBindExpr, lambdaBindExpr->mFatArrowToken))
bool isAutocompleteNode = false;
if (lambdaBindExpr->mFatArrowToken != NULL)
{
if (autoComplete->IsAutocompleteNode(lambdaBindExpr, lambdaBindExpr->mFatArrowToken))
isAutocompleteNode = true;
}
else if (autoComplete->IsAutocompleteNode(lambdaBindExpr, lambdaBindExpr->mCloseParen))
isAutocompleteNode = true;
if (isAutocompleteNode)
autoComplete->CheckInvocation(lambdaBindExpr, lambdaBindExpr->mOpenParen, lambdaBindExpr->mCloseParen, lambdaBindExpr->mCommas);
if (autoComplete->mIsCapturingMethodMatchInfo)