Merge pull request #32652 from Chaosus/shader_fix_autocompletion

Fixed invalid autocompletion pasting of shader param name
This commit is contained in:
Rémi Verschelde 2019-10-08 22:52:46 +02:00 committed by GitHub
commit bb41f0b0cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5419,7 +5419,7 @@ Error ShaderLanguage::complete(const String &p_code, const Map<StringName, Funct
if (block->parent_function) {
if (comp_ident) {
for (int i = 0; i < block->parent_function->arguments.size(); i++) {
matches.insert(block->parent_function->arguments[i].name, ScriptCodeCompletionOption::KIND_FUNCTION);
matches.insert(block->parent_function->arguments[i].name, ScriptCodeCompletionOption::KIND_VARIABLE);
}
}
skip_function = block->parent_function->name;