From 3d0c29cc0ae938332178dacbef3acfe431cdaab5 Mon Sep 17 00:00:00 2001 From: ajreckof <66184050+ajreckof@users.noreply.github.com> Date: Sat, 5 Aug 2023 02:15:45 +0200 Subject: [PATCH] Fix completion option location not found (cherry picked from commit 4b724c9252ad6d3a27efc9c4a13ea300b6daaf16) --- modules/gdscript/gdscript_editor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp index cd34feb8b31..465739e9479 100644 --- a/modules/gdscript/gdscript_editor.cpp +++ b/modules/gdscript/gdscript_editor.cpp @@ -1042,7 +1042,7 @@ static void _find_identifiers_in_base(const GDScriptCompletionIdentifier &p_base List 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); } @@ -1116,7 +1116,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); }