diff options
author | Haoyu Qiu <timothyqiu32@gmail.com> | 2022-08-15 23:28:49 +0800 |
---|---|---|
committer | Haoyu Qiu <timothyqiu32@gmail.com> | 2022-08-15 23:28:49 +0800 |
commit | 660c700f9c1b2537ec9f2ae90fbd9c756a96883e (patch) | |
tree | 9e714526bedcbd6afc85ee780a9c5ad21f9d6424 /modules/gdscript | |
parent | 4426049c64d90e07b23e36e02ad3db2ac5540ac4 (diff) |
Fix action name completion for `Input`
Diffstat (limited to 'modules/gdscript')
-rw-r--r-- | modules/gdscript/gdscript_editor.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp index c18412bc63..4c908166df 100644 --- a/modules/gdscript/gdscript_editor.cpp +++ b/modules/gdscript/gdscript_editor.cpp @@ -2031,8 +2031,13 @@ static bool _guess_identifier_type(GDScriptParser::CompletionContext &p_context, r_type.type.kind = GDScriptParser::DataType::NATIVE; r_type.type.native_type = p_identifier; r_type.type.is_constant = true; - r_type.type.is_meta_type = !Engine::get_singleton()->has_singleton(p_identifier); - r_type.value = Variant(); + if (Engine::get_singleton()->has_singleton(p_identifier)) { + r_type.type.is_meta_type = false; + r_type.value = Engine::get_singleton()->get_singleton_object(p_identifier); + } else { + r_type.type.is_meta_type = true; + r_type.value = Variant(); + } } return false; |