Fix completion option location not found

This commit is contained in:
ajreckof 2023-08-05 02:15:45 +02:00
parent 16a93563bf
commit 4b724c9252
1 changed files with 2 additions and 2 deletions

View File

@ -1076,7 +1076,7 @@ static void _find_identifiers_in_base(const GDScriptCompletionIdentifier &p_base
List<PropertyInfo> members;
scr->get_script_property_list(&members);
for (const PropertyInfo &E : members) {
int location = p_recursion_depth + _get_property_location(scr->get_class_name(), E.class_name);
int location = p_recursion_depth + _get_property_location(scr->get_class_name(), E.name);
ScriptLanguage::CodeCompletionOption option(E.name, ScriptLanguage::CODE_COMPLETION_KIND_MEMBER, location);
r_result.insert(option.display, option);
}
@ -1150,7 +1150,7 @@ static void _find_identifiers_in_base(const GDScriptCompletionIdentifier &p_base
if (E.name.contains("/")) {
continue;
}
int location = p_recursion_depth + _get_property_location(type, E.class_name);
int location = p_recursion_depth + _get_property_location(type, E.name);
ScriptLanguage::CodeCompletionOption option(E.name, ScriptLanguage::CODE_COMPLETION_KIND_MEMBER, location);
r_result.insert(option.display, option);
}