Fix completion option location not found
(cherry picked from commit 4b724c9252
)
This commit is contained in:
parent
06f6ef8fca
commit
3d0c29cc0a
|
@ -1042,7 +1042,7 @@ static void _find_identifiers_in_base(const GDScriptCompletionIdentifier &p_base
|
||||||
List<PropertyInfo> members;
|
List<PropertyInfo> members;
|
||||||
scr->get_script_property_list(&members);
|
scr->get_script_property_list(&members);
|
||||||
for (const PropertyInfo &E : 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);
|
ScriptLanguage::CodeCompletionOption option(E.name, ScriptLanguage::CODE_COMPLETION_KIND_MEMBER, location);
|
||||||
r_result.insert(option.display, option);
|
r_result.insert(option.display, option);
|
||||||
}
|
}
|
||||||
|
@ -1116,7 +1116,7 @@ static void _find_identifiers_in_base(const GDScriptCompletionIdentifier &p_base
|
||||||
if (E.name.contains("/")) {
|
if (E.name.contains("/")) {
|
||||||
continue;
|
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);
|
ScriptLanguage::CodeCompletionOption option(E.name, ScriptLanguage::CODE_COMPLETION_KIND_MEMBER, location);
|
||||||
r_result.insert(option.display, option);
|
r_result.insert(option.display, option);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue