Merge pull request #48836 from Chaosus/color_autocompletion_fix

Show colored rects for autocompletion of Color constants in functions
This commit is contained in:
Rémi Verschelde 2021-05-19 14:22:47 +02:00 committed by GitHub
commit 365ab88894
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -741,6 +741,7 @@ static void _find_identifiers_in_suite(const GDScriptParser::SuiteNode *p_suite,
ScriptCodeCompletionOption option;
if (p_suite->locals[i].type == GDScriptParser::SuiteNode::Local::CONSTANT) {
option = ScriptCodeCompletionOption(p_suite->locals[i].name, ScriptCodeCompletionOption::KIND_CONSTANT);
option.default_value = p_suite->locals[i].constant->initializer->reduced_value;
} else {
option = ScriptCodeCompletionOption(p_suite->locals[i].name, ScriptCodeCompletionOption::KIND_VARIABLE);
}