fix: undo/redo for auto disabling if-return blocks #6018
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The basics
npm run format
andnpm run lint
The details
Resolves
#6010
Proposed Changes
Wrap the enable/disable event for the if-return in the same group as the initial move event, so the events get undone together. This is the same way the break/continue block handles this behavior.
Behavior Before Change
Undoing was not possible because the events were not properly grouped.
Behavior After Change
Now the events are properly grouped so undo and redo works.
Reason for Changes
Undo and redo are helpful.
Test Coverage
Tested on:
Documentation
Additional Information
N/A