Undo history not working?

Hello Developer,
I can’t create thread in bugs category and since it’s scripting related i think i might post it here. Well my problem is this, i was just typing some code, and i typed an if statement but i remove it to test if it’s working but, when i finished testing i want to return the if statement back but i can’t undo to the if statement.

You might answer:

  • did you press “Reload script”? no i didn’t press any buttons i just press test then untest and when I’m about to undo, can’t undo anymore
  • did you accidentally typed something else? no i didn’t type any to edit the script, when i finished testing the script history edit was cleared so i can’t undo or redo.
  • did you close the script window? no i didn’t close the script window, i left it open.

No idea why that happened.

You can work around it by commenting code out that you temporarily don’t want to execute, instead of deleting it and hoping that the undo history doesn’t break