Skip to content

Allow the inline diff editor to be centered.#97311

Merged
isidorn merged 1 commit intomicrosoft:masterfrom
petevdp:allow-centered-inline-diff-editor
May 11, 2020
Merged

Allow the inline diff editor to be centered.#97311
isidorn merged 1 commit intomicrosoft:masterfrom
petevdp:allow-centered-inline-diff-editor

Conversation

@petevdp
Copy link
Contributor

@petevdp petevdp commented May 8, 2020

This PR fixes #97165

The issue here was that while DiffEditorInput is an instance of SideBySideEditorInput, it still allows for inline editing based on the config value diffEditor.renderSideBySide.

My proposed fix involves handling that case and centering appropriately, as well as calling Layout.centerEditorLayout when the configuration changes since centering behaviour is now contingent on the above configuration option.

One thing to note is that this will also cause the layout to be centered/uncentered when workbench.editor.centeredLayoutAutoResize changes, since we're also using this config option to determine centering behaviour. I think the fact that we weren't already updating based on config changes counts as a bug as well.

To test these changes use the test case outlined in the issue(#97165)

@isidorn
Copy link
Collaborator

isidorn commented May 11, 2020

Thank you very much for this PR. I tested the changes and it works great. Thus merging in.

@isidorn isidorn merged commit 8f0f44c into microsoft:master May 11, 2020
@isidorn isidorn added this to the May 2020 milestone May 11, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jun 25, 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.

When in centered layout, show inline diff view also in centered layout

2 participants