summaryrefslogtreecommitdiff
path: root/modules/gdscript/gdscript_editor.cpp
diff options
context:
space:
mode:
authorGeorge Marques <george@gmarqu.es>2023-01-16 09:44:23 -0300
committerGitHub <noreply@github.com>2023-01-16 09:44:23 -0300
commit629796c333bcc46f2aeb4399c1a5786d6b013289 (patch)
tree20aecb2b20419cbaec90abfee3f19c1803cbb63a /modules/gdscript/gdscript_editor.cpp
parent04a39ecd846f40ac1049b699291f28b2f08e2185 (diff)
parentaa4bceff3edc766f94cbadaca8ff6adfbf52735d (diff)
Merge pull request #69970 from poohcom1/fix/autocomplete-custom-class
Fixes https://github.com/godotengine/godot/issues/69941
Diffstat (limited to 'modules/gdscript/gdscript_editor.cpp')
-rw-r--r--modules/gdscript/gdscript_editor.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp
index 397c43b14b..3fc0924b4c 100644
--- a/modules/gdscript/gdscript_editor.cpp
+++ b/modules/gdscript/gdscript_editor.cpp
@@ -1275,6 +1275,14 @@ static void _find_identifiers(const GDScriptParser::CompletionContext &p_context
}
r_result.insert(option.display, option);
}
+
+ // Global classes
+ List<StringName> global_classes;
+ ScriptServer::get_global_class_list(&global_classes);
+ for (const StringName &E : global_classes) {
+ ScriptLanguage::CodeCompletionOption option(E, ScriptLanguage::CODE_COMPLETION_KIND_CLASS, ScriptLanguage::LOCATION_OTHER_USER_CODE);
+ r_result.insert(option.display, option);
+ }
}
static GDScriptCompletionIdentifier _type_from_variant(const Variant &p_value) {