Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
0x0ACB opened this issue Feb 19, 2024 · 3 comments

Comments

@0x0ACB
Copy link
Contributor

0x0ACB commented Feb 19, 2024

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
grafik

Steps to reproduce

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

Minimal reproduction project (MRP)

@Mickeon
Copy link
Contributor

Mickeon commented Feb 19, 2024

This has been not been fixed in master (currently 4.3).
image

Custom type hints, it's worth noting. It seems like #86176 does not handle this edge-case (CC @dalexeev).

@dalexeev
Copy link
Member

This is difficult to fix without a major refactoring of the highlighter. For each new line, the context is lost (with the exception of code regions).

@0x0ACB
Copy link
Contributor Author

0x0ACB commented Feb 20, 2024

Wouldn't it make sense to keep the context for the current statement atleast? I.e. if inside brackets you dont discard on linebreak.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants