summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_editor.cpp
diff options
context:
space:
mode:
authorGeorge L. Albany <Megacake1234@gmail.com>2024-10-27 13:25:03 +0000
committerGitHub <noreply@github.com>2024-10-27 13:25:03 +0000
commit6e3e9dfb9857b751f59fd4b40c55e9262ff5a864 (patch)
treed064b49a4766ab69a0ac6e195868ad4b3443bab3 /modules/gdscript/gdscript_editor.cpp
parentbec9ffacba1385b0ba808f6dbb66abb7dc53639d (diff)
parent953af98c795066a5a450a3401cc8a4fbc6c12620 (diff)
downloadredot-engine-6e3e9dfb9857b751f59fd4b40c55e9262ff5a864.tar.gz
Merge pull request #814 from Spartan322/merge/61accf0
Merge commit godotengine/godot@61accf0
Diffstat (limited to 'modules/gdscript/gdscript_editor.cpp')
-rw-r--r--modules/gdscript/gdscript_editor.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp
index b82fedf180..55a9c2db40 100644
--- a/modules/gdscript/gdscript_editor.cpp
+++ b/modules/gdscript/gdscript_editor.cpp
@@ -3166,7 +3166,9 @@ static void _find_call_arguments(GDScriptParser::CompletionContext &p_context, c
HashMap<String, ScriptLanguage::CodeCompletionOption> options;
GDScriptParser::CompletionContext completion_context = parser.get_completion_context();
- completion_context.base = p_owner;
+ if (completion_context.current_class != nullptr && completion_context.current_class->outer == nullptr) {
+ completion_context.base = p_owner;
+ }
bool is_function = false;
switch (completion_context.type) {
@@ -3536,13 +3538,13 @@ static void _find_call_arguments(GDScriptParser::CompletionContext &p_context, c
return OK;
}
-#else
+#else // !TOOLS_ENABLED
Error GDScriptLanguage::complete_code(const String &p_code, const String &p_path, Object *p_owner, List<ScriptLanguage::CodeCompletionOption> *r_options, bool &r_forced, String &r_call_hint) {
return OK;
}
-#endif
+#endif // TOOLS_ENABLED
//////// END COMPLETION //////////
@@ -4127,4 +4129,4 @@ static Error _lookup_symbol_from_base(const GDScriptParser::DataType &p_base, co
return ERR_CANT_RESOLVE;
}
-#endif
+#endif // TOOLS_ENABLED