Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allow the inline diff editor to be centered. #97311

Merged
merged 1 commit into from
May 11, 2020
Merged

Allow the inline diff editor to be centered. #97311

merged 1 commit into from
May 11, 2020

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
Contributor

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
# for free to subscribe to this conversation on GitHub. Already have an account? #.
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