mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 20:12:21 +02:00
Improved override method insertion in autocomplete
This commit is contained in:
parent
0ac49db97e
commit
d18e12866b
2 changed files with 8 additions and 1 deletions
|
@ -2627,6 +2627,13 @@ void BfAutoComplete::CheckMethod(BfMethodDeclaration* methodDeclaration, bool is
|
||||||
{
|
{
|
||||||
mInsertStartIdx = methodDeclaration->GetSrcStart();
|
mInsertStartIdx = methodDeclaration->GetSrcStart();
|
||||||
mInsertEndIdx = methodDeclaration->GetSrcEnd();
|
mInsertEndIdx = methodDeclaration->GetSrcEnd();
|
||||||
|
if (methodDeclaration->mBody != NULL)
|
||||||
|
{
|
||||||
|
if (methodDeclaration->mBody->mTriviaStart != -1)
|
||||||
|
mInsertEndIdx = methodDeclaration->mBody->mTriviaStart;
|
||||||
|
else
|
||||||
|
mInsertEndIdx = methodDeclaration->mBody->GetSrcStart();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String filter;
|
String filter;
|
||||||
|
|
|
@ -22337,7 +22337,7 @@ void BfModule::DoMethodDeclaration(BfMethodDeclaration* methodDeclaration, bool
|
||||||
nameNode = ctorDeclaration->mThisToken;
|
nameNode = ctorDeclaration->mThisToken;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (autoComplete->IsAutocompleteNode(nameNode))
|
if ((autoComplete->IsAutocompleteNode(nameNode)) && (autoComplete->mResolveType != BfResolveType_Autocomplete))
|
||||||
{
|
{
|
||||||
autoComplete->mInsertStartIdx = nameNode->GetSrcStart();
|
autoComplete->mInsertStartIdx = nameNode->GetSrcStart();
|
||||||
autoComplete->mInsertEndIdx = nameNode->GetSrcEnd();
|
autoComplete->mInsertEndIdx = nameNode->GetSrcEnd();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue