Code Folding won't be remembered after latest update. (fixes #26157) #26322
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.
This is a fix for #26157 intended to be pushed to the recovery release.
Issue (original):
=> view state is lost
Issue (variant):
=> view state is lost
We always store the view state of files when you switch between editors or when you close and come back to editors (persisted in local storage). The bug happened during last milestone because the way we dispose resources changed.
Previously:
Now:
=> since the model is disposed, the view state is undefined
My fix introduces a new event
onWillCloseEditor
directly on the stacks model which the text file editor can use to persist the view state right before the model goes away. On top of that we also only persist the view state when the input is not disposed, because otherwise we still hit the current issue that we try to persist the view state of a disposed model.@Tyriar can you check the code and let me know what you think? If you guys want to move ahead and release recovery today, feel free to merge. Otherwise I can do it tomorrow.