From 5d4853f8ca5fd89ad70e19ed921e0063661f42d5 Mon Sep 17 00:00:00 2001 From: Yuri Rubinsky Date: Mon, 22 Aug 2022 11:59:24 +0300 Subject: [PATCH] Fix completion of parameters in function call --- modules/gdscript/gdscript_parser.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index b4da94e4486..f1c841e9dcd 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));