YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
26 stars 8 forks source link

Code Editor: "instance.MACRO" and "variable:MACRO" don't highlight using the correct colour for macro names #4468

Open backYard321 opened 9 months ago

backYard321 commented 9 months ago

Description

Using dot notation for macros (instance.MACRO) will make them appear the same colour as variables. EG:

image

This also occurs when creating structs, ie struct = {variable:MACRO}

Expected Change

Highlight macros with the correct colour, even if dot notation is being used

Steps To Reproduce

  1. Start GameMaker
  2. Create a macro (EG: #macro macro image_index)
  3. Write self.macro and macro separately
  4. See the issue

Macros.zip

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

Always

Which version of GameMaker are you reporting this issue for?

2023.11.1 (Monthly)

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

Windows 10

Are you running GameMaker from inside your Steam library?

None

Contact Us Package Attached?

Sample Project Added?

YYDan commented 9 months ago

Strange coincidence, as I was just gathering my evidence and about to report something very related: that in the current Beta release "configname:MACRONAME" colours that definition properly, but then uses a user variable colour for all subsequent MACRONAME appearances.

zreedy commented 8 months ago

This is fixed in the new Code Editor, the Legacy Code Editor does not have a facility to determine enough information about the context to solve this issue.

Emc1923 commented 7 months ago

Verified working internally in CE2 as of IDE v2024.400.0.526 Runtime v2024.400.0.547

attic-stuff commented 7 months ago

Verified working internally in CE2 as of IDE v2024.400.0.526 Runtime v2024.400.0.547

i cannot get this working in 2024.4. in code editor 1, to dot access fields that are macro based you have to put a space in there to retain the macro syntax color because of the limitations mentioned by zach. that looks like this: A

in ce2, that same file doesn't even color the macros correctly with the space: B

or without the space: C

Emc1923 commented 7 months ago

Reopening as variable:MACRO / instance.MACRO don't seem to be working reliably in CE2 (only works sometimes) - This only seems to be affecting code colouring, tooltips are correct when hovering over.