summaryrefslogtreecommitdiff
path: root/modules/gdscript
diff options
context:
space:
mode:
authorYuri Rubinsky <chaosus89@gmail.com>2022-08-22 11:59:24 +0300
committerYuri Rubinsky <chaosus89@gmail.com>2022-09-30 15:42:05 +0300
commit5d4853f8ca5fd89ad70e19ed921e0063661f42d5 (patch)
tree7c6343f336e419446d9cff340bf60dce9f4de6f7 /modules/gdscript
parentf47979f0874b2ca6134e71575fbb359c6cc5ced0 (diff)
Fix completion of parameters in function call
Diffstat (limited to 'modules/gdscript')
-rw-r--r--modules/gdscript/gdscript_parser.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp
index b4da94e448..f1c841e9dc 100644
--- a/modules/gdscript/gdscript_parser.cpp
+++ b/modules/gdscript/gdscript_parser.cpp
@@ -2937,6 +2937,10 @@ GDScriptParser::ExpressionNode *GDScriptParser::parse_call(ExpressionNode *p_pre
push_error(R"(Expected expression as the function argument.)");
} else {
call->arguments.push_back(argument);
+
+ if (argument->type == Node::IDENTIFIER && current.cursor_place == GDScriptTokenizer::CURSOR_BEGINNING) {
+ completion_context.type = COMPLETION_IDENTIFIER;
+ }
}
ct = COMPLETION_CALL_ARGUMENTS;
} while (match(GDScriptTokenizer::Token::COMMA));