godotengine / godotengine/godot-vscode-plugin

Commas within method call arguments cause incorrect parameter highlighting

Open
#1,001 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
2.1k
Forks
257
PR merge metrics
No merged PRs in 30d

Description

### Godot version

4.6.1.stable

### VS Code version

1.113.0

### Godot Tools VS Code extension version

2.6.1

### System information

macOS Tahoe 26.3.1

### Issue description

When calling a method with a value that includes one or more commas, the highlighted parameter in the floating panel becomes offset relative to the active parameter. This issue occurs with inline arrays and dictionaries, but not with inner calls to other methods, which behave correctly.

![Image](https://github.com/user-attachments/assets/c222ca46-2702-4c85-a96d-15aa91e46abf)

### Steps to reproduce

1. Begin typing a call to a method that expects either an array or a dictionary
2. Activate method signature help by typing `(` or `,`
3. For the array/dictionary parameter, include multiple members/properties with commas in between
4. Observe that the highlighted parameter in the floating panel becomes increasingly offset with each comma

Example snippet from capture above:
```gdscript
func method1(a: Array, b: bool) -> void:
print(a, b);

func method2() -> void:
method1([1, 2, 3], true);
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.