diff options
author | Yuri Rubinsky <chaosus89@gmail.com> | 2022-10-03 17:44:20 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-03 17:44:20 +0300 |
commit | 321251a133920912f2764272626f32c788ab70b9 (patch) | |
tree | ee11fcf3c1b01352131a23beb23e752d7d684d46 /modules/gdscript | |
parent | c477e7c46102e92c1653750e521bdbdbe5c79c0b (diff) | |
parent | 7822378293094837cbc6c8dd32d1205bc1cac289 (diff) |
Merge pull request #66759 from Chaosus/gds_fix_param_completion
Diffstat (limited to 'modules/gdscript')
-rw-r--r-- | modules/gdscript/gdscript_parser.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index f1c841e9dc..980a946e23 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -2932,13 +2932,14 @@ GDScriptParser::ExpressionNode *GDScriptParser::parse_call(ExpressionNode *p_pre // Allow for trailing comma. break; } + bool use_identifier_completion = current.cursor_place == GDScriptTokenizer::CURSOR_END || current.cursor_place == GDScriptTokenizer::CURSOR_MIDDLE; ExpressionNode *argument = parse_expression(false); if (argument == nullptr) { 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) { + if (argument->type == Node::IDENTIFIER && use_identifier_completion) { completion_context.type = COMPLETION_IDENTIFIER; } } |