YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
26 stars 8 forks source link

Code Editor 2: using the word "end" in an enum causes the formatting and autocomplete to stop functioning correctly #8456

Closed scott-dunbar closed 2 days ago

scott-dunbar commented 3 days ago

Description

Attempting to use the word end in an enum causes things like autocomplete to think it is no longer in an enum declaration. Rainbow brackets and code highlighting in general also becomes confused

Image

https://api.gamemaker.io/api/github/downloads/45db4609-3d7e-4ddc-8e22-97e6667b45de

Expected Change

No response

Steps To Reproduce

  1. Start GameMaker
  2. Create a script
  3. Add an enum
  4. enter "end" without quotes as one of the enum entries
  5. See the issue

How reliably can you recreate this issue using your steps above?

Always

Which version of GameMaker are you reporting this issue for?

2024.1100 (Betas)

Which operating system(s) are you seeing the problem on?

No response

Are you running GameMaker from inside your Steam library?

None

Sample Package Attached?

Sample Project Added?

rwkay commented 3 days ago

end is a GM keyword - you cannot use keywords in an enum

scott-dunbar commented 3 days ago

Only the keyword end shows this behaviour - the others should match or it should match them (my recommendation is that end should behave as the other keywords do)

Image

I am aware that you should not use the keywords in this manner - this issue is that CE2 does not show that correctly and causes knockons with a specific keyword

rwkay commented 3 days ago

but end is a synonym for } so you are finishing the enum

stuckie commented 2 days ago

Closing as above