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

Fix OS singleton being incorrectly highlighted as a constant #402

Merged
merged 2 commits into from
Aug 7, 2022

Conversation

DaelonSuzuka
Copy link
Collaborator

@DaelonSuzuka DaelonSuzuka commented Aug 5, 2022

Code_55p7kAtleh

@Calinou Calinou added the bug label Aug 6, 2022
@Calinou
Copy link
Member

Calinou commented Aug 6, 2022

OS is not a primitive type like int or Vector2, so it shouldn't be highlighted this way. The issue is likely elsewhere.

How does the highlighting of other singletons like Engine or VisualServer look?

@DaelonSuzuka
Copy link
Collaborator Author

All the other built-in singletons are PascalCase so they're green like classes.

image

@Calinou
Copy link
Member

Calinou commented Aug 6, 2022

My guess is that the const highlight is kicking in as the identifier's name is all-uppercase. (The built-in script editor doesn't have such a highlight, but maybe this extension does.)

@DaelonSuzuka
Copy link
Collaborator Author

Yeah, that's exactly what's happening. OS doesn't trigger the same rule as the other singletons because it doesn't have any lower case letters. This change is just bringing OS in line with the other singletons.

Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Calinou Calinou merged commit ef450ca into godotengine:master Aug 7, 2022
@DaelonSuzuka DaelonSuzuka deleted the fix-OS-highlighting branch August 22, 2022 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants