Skip to content

Commit 5515b76

Browse files
committed
Editor: dont display derived types in AutoComplete list
This fixes AutoComplete list showing dynamic array and pointer types of T.
1 parent 8f736fe commit 5515b76

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Editor/AGS.Editor/Panes/ScintillaWrapper.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2371,7 +2371,9 @@ private void AddGlobalsFromScript(List<string> globalsList, IScript script, Dict
23712371
}
23722372
foreach (ScriptStruct ss in script.AutoCompleteData.Structs)
23732373
{
2374-
if ((ShouldShowThis(ss, defines)) && (ss.FullDefinition))
2374+
// Display only basic types that have full definition AND are not derived types,
2375+
// i.e. not dynamic arrays of T or pointer to T.
2376+
if ((ShouldShowThis(ss, defines)) && (ss.FullDefinition) && (string.IsNullOrEmpty(ss.BaseType)))
23752377
{
23762378
globalsList.Add(ss.Name + "?" + IMAGE_INDEX_STRUCT);
23772379
}

0 commit comments

Comments
 (0)