Skip to content

Only treat diff editors as matching if they have the same value for 'forceOpenABinaryEditor'#88183

Merged
mjbvz merged 1 commit intomicrosoft:masterfrom
mjbvz:fix-custom-editor-diff-views
Jan 7, 2020
Merged

Only treat diff editors as matching if they have the same value for 'forceOpenABinaryEditor'#88183
mjbvz merged 1 commit intomicrosoft:masterfrom
mjbvz:fix-custom-editor-diff-views

Conversation

@mjbvz
Copy link
Copy Markdown
Collaborator

@mjbvz mjbvz commented Jan 7, 2020

Fixes #88166

Custom editors used in diff views for binary files were broken. The root cause we were creating a DiffEditorInput that set forceOpenAsBinary === true, however this input was discarded as it was judged to be the same as the existing editor input which had forceOpenAsBinary === undefined

To fix this, I've updated the matches function so that it also considers forceOpenAsBinary

…Binary setting

Fixes microsoft#88166

Custom editors used in diff views for binary files were broken. The root cause we were creating a `DiffEditorInput` that set `forceOpenAsBinary === true`, however this input was discarded as it was judged to be the same as the existing editor input which had `forceOpenAsBinary === undefined`

The fix here is to make the `matches` function take `forceOpenAsBinary` into account
@mjbvz mjbvz requested a review from bpasero January 7, 2020 02:34
@mjbvz mjbvz self-assigned this Jan 7, 2020
@mjbvz mjbvz added this to the January 2020 milestone Jan 7, 2020
@mjbvz mjbvz merged commit fd67371 into microsoft:master Jan 7, 2020
@mjbvz mjbvz deleted the fix-custom-editor-diff-views branch January 7, 2020 19:29
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Image diff from source control view no longer works

2 participants