Skip to content

Rework Script Editor editing history #108057

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

KoBeWi
Copy link
Member

@KoBeWi KoBeWi commented Jun 27, 2025

Supposed to fix #92420

The core of the problem is that Script Editor assumes that actions within the same script will not be stored in the history. So like, you can go back to previous script, move around, go forward to next script and that altered state will be stored in the previous history step. #63515 was added on top of this behavior, which is obviously wrong.

My changes in this PR make any history change always be pushed as the last action. So if you go back to previous script and do something that affects history, you can no longer go back to the next script, because the "redo" is discarded. This is how VS Code behaves for example.

Putting as draft, because I got too tangled in the code and don't feel like touching anymore it right now. Maybe I'll finish it sometime.

Also fun fact, ScriptTextEditor has some methods referring to "previous state", but they are effectively never used. It's some leftover from early versions of #63515.

@KoBeWi KoBeWi added this to the 4.x milestone Jun 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Script editing history is not always correct
1 participant