Undo / Redo no longer does one action at a time and does many things in bulk

Undo/Redo behavior has been changed such that undoing/redoing now applies many actions at once, where as prior it used to only undo one change at a time. This just started happening on 7/7/23

Expected behavior

Undo/Redo should only apply one change at a time rather than many, or add an option for it

2 Likes

Hi Joey, thanks for reporting! Want to make sure you are talking about script editor, or 3D view?

Would you elaborate more detail about what kind change you expect editor/3D view shouldn’t undo at a time but editor/3D view does?

Thanks!

1 Like

I am referring to the script editor. Thanks!

The behavior it had prior to an update that got pushed out a few days ago. It seems to be placing many edits that are “similar” or “within a period of time” into the same edit, so when you undo/redo - it performs many more actions than intended. Refer to the default behavior in a JetBrains IDE, VS Code, or Notepad++.

Thanks for clarifying, @CoderJoey!

We do merge similar edits into one undo step, such as when a user types single characters continuously. ScriptEditors will merge these edits into a single undo step. However, this behavior has been in place for a long time. Do you have any recent examples where we have started merging edits into one undo step that we didn’t do before? This information can help us better understand the issue.

I’m aware that VSCode splits user typing into multiple steps if there are special characters, like space or =. However, ScriptEditor indeed has different behavior in this case.

Again, thanks for helping us to improve scripting experience!

1 Like

The main issue I have is that when you make an edit that might be 15 lines away from where the previous edit was made, pressing undo should not undo both of those changes. It has the potential to cause a lot of bugs unknowingly.

Here is a video showing this behavior:

These two lines share nothing in common. This is an innocent case, but I have had numerous occasions where it actually changes import code unrelated to the recent change. It also interrupts workflow.

1 Like

Hello, @CoderJoey!

Apologies for the delayed response. The issue should be resolved today. Restart the Studio and verify if the problem persists. Thank you for bringing this to our attention!

2 Likes

Thank you! I will have a look!

1 Like

Hi, we reverted the fix because we found there is another issue happened with this fix. Will give another update once we release fix again. Sorry for the inconvenience.

3 Likes

Hi @CoderJoey,

The fix is released since yesterday. Sorry for taking that long. Please let us know if you still see any issue.

Happy coding!

1 Like