Fall back to the compare editor when no unified diff can be shown - #2843
Merged
vogella merged 1 commit intoJul 31, 2026
Merged
Conversation
The marker status that tells the caller "the user canceled, keep the text editor" used code 1, which is exactly the code of Status.CANCEL_STATUS. UnifiedDiffManager.open returns that plain cancel status when it cannot show a unified diff at all, namely when the editor has no annotation model or when validateEdit fails. Those were mistaken for a user cancellation, so the fallback to the classic compare editor was skipped and the user was left with a plain text editor showing no comparison. The marker is now its own status object compared by identity, so it cannot be confused with any other cancel status. Regression from 4a9fc3f.
Contributor
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.
The marker status introduced in 4a9fc3f to say "the user canceled the computation, keep the text editor open" used status code 1, which is exactly the code of
Status.CANCEL_STATUS.UnifiedDiffManager.openreturns that plain cancel status when it cannot show a unified diff at all, namely when the editor has no annotation model and whenvalidateEditfails. Both were then mistaken for a user cancellation, so the fallback to the classic compare editor was skipped and the user was left looking at a plain text editor with no comparison in it.The marker is now its own status object, compared by identity, so it cannot collide with any other cancel status. A test pins that it stays distinguishable from
Status.CANCEL_STATUS.Regression from 4a9fc3f, reported after it was merged.