godotengine / godotengine/godot

Syntax Highlighting for custom type hints fails after linebreaks in parameter list

Open
#88,552 3 comments 0 reactions 0 assignees View on GitHub
bug topic:editor topic:gdscript
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

4.2.1

### System information

Windows 10, Godot 4.2.1, Gles3 compatibility

### Issue description

When adding typehints to function declarations the highlighting stops working if linebreaks are added:

![grafik](https://github.com/godotengine/godot/assets/11277588/c4808fbe-3cc4-46c0-a11e-81776f115a2f)
![grafik](https://github.com/godotengine/godot/assets/11277588/5901c06e-d519-48f4-8faf-97ce0f2605b5)

### Steps to reproduce

Write a function with type hints for some custom types. Add linebreaks in the parameter list

### Minimal reproduction project (MRP)

-

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue using the listed steps in Godot 4.2.1: add custom type hints to a function declaration, then insert line breaks in its parameter list. Trace the editor's syntax-highlighting behavior for this case and verify that highlighting continues correctly across the line breaks.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, godot
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.