From f7120e4c7265de3660d6182c0a9370b9761fd0aa Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Tue, 28 Jan 2025 17:35:40 -0800 Subject: [PATCH] Another autocomplete fix for failed invoke list --- IDE/src/ui/AutoComplete.bf | 4 ++-- IDEHelper/Compiler/BfCompiler.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/IDE/src/ui/AutoComplete.bf b/IDE/src/ui/AutoComplete.bf index cb006304..69ea742a 100644 --- a/IDE/src/ui/AutoComplete.bf +++ b/IDE/src/ui/AutoComplete.bf @@ -1582,7 +1582,7 @@ namespace IDE.ui mInsertStartIdx--; }*/ - if ((mInvokeWidget != null) && (mInvokeWidget.mEntryList.Count > 0)) + if ((mInvokeWidget != null) && (mInvokeSrcPositions != null) && (mInvokeWidget.mEntryList.Count > 0)) { var data = mTargetEditWidget.Content.mData; @@ -2042,7 +2042,7 @@ namespace IDE.ui if (mInvokeWidget != null) { prevInvokeSelect = mInvokeWidget.mSelectIdx; - if ((mInvokeWidget.mEntryList.Count > 0) && (!mInvokeSrcPositions.IsEmpty) && (mInvokeWidget.mSelectIdx >= 0)) + if ((mInvokeWidget.mEntryList.Count > 0) && (mInvokeSrcPositions != null) && (!mInvokeSrcPositions.IsEmpty) && (mInvokeWidget.mSelectIdx >= 0)) { if (IsInPanel()) { diff --git a/IDEHelper/Compiler/BfCompiler.cpp b/IDEHelper/Compiler/BfCompiler.cpp index 9a6c88c9..9d754d17 100644 --- a/IDEHelper/Compiler/BfCompiler.cpp +++ b/IDEHelper/Compiler/BfCompiler.cpp @@ -8346,7 +8346,7 @@ void BfCompiler::GenerateAutocompleteInfo() auto methodMatchInfo = autoComplete->mMethodMatchInfo; if ((methodMatchInfo != NULL) && (wantsDocEntry == NULL)) { - if (methodMatchInfo->mInstanceList.size() > 0) + if ((methodMatchInfo->mInstanceList.size() > 0) && (methodMatchInfo->mBestIdx >= 0)) { if (autoComplete->mIdentifierUsed != NULL) {