Repository navigation
Drop stale shadowed folds of the editor right away in Unified Diff - #3048
Open
subham-sahu06 wants to merge 2 commits into
Open
subham-sahu06 wants to merge 2 commits into
subham-sahu06 wants to merge 2 commits into
Conversation
While an unchanged region is collapsed, the folds of the editor it swallows are taken out of the projection model and remembered so they can be put back once the region is expanded. Out of the model their positions no longer follow the document, so a remembered fold is only restorable until the next edit. Such stale folds were nevertheless kept until their region was expanded. Editors that re-add missing folds on every reconcile, such as the Generic Editor with its indentation folding, contribute a new copy of every swallowed fold after each edit, so the remembered folds piled up for as long as the region stayed collapsed, and every sync of the folds iterated all of them. Drop a remembered fold as soon as the document was modified since it was taken out, whether or not its region is still collapsed. Which folds are put back does not change, since a stale fold was never restored. Contributes to eclipse-platform#2943 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
While an unchanged region is collapsed, the folds of the editor it swallows are taken out of the projection model and remembered so they can be put back once the region is expanded. Out of the model their positions no longer follow the document, so a remembered fold is only restorable until the next edit. Such stale folds were nevertheless kept until their region was expanded.
Editors that re-add missing folds on every reconcile, such as the Generic Editor with its indentation folding, contribute a new copy of every swallowed fold after each edit, so the remembered folds piled up for as long as the region stayed collapsed, and every sync of the folds iterated all of them.
Drop a remembered fold as soon as the document was modified since it was taken out, whether or not its region is still collapsed. Which folds are put back does not change, since a stale fold was never restored.
Contributes to #2943