summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_editor.cpp
diff options
context:
space:
mode:
authorSpartan322 <Megacake1234@gmail.com>2024-10-26 22:41:20 -0400
committerSpartan322 <Megacake1234@gmail.com>2024-10-26 22:41:20 -0400
commit953af98c795066a5a450a3401cc8a4fbc6c12620 (patch)
tree9e100139ffacbcae90fbb5e6b10413e50a8e76b6 /modules/gdscript/gdscript_editor.cpp
parenta43f7f1c02a887d19694bdebac83af4d32cf3433 (diff)
parent61accf060515416da07d913580419fd8c8490f7b (diff)
downloadredot-engine-953af98c795066a5a450a3401cc8a4fbc6c12620.tar.gz
Merge commit godotengine/godot@61accf060515416da07d913580419fd8c8490f7b
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