Vscode: Centered mode doesn't work when views are split in horizontal mode

Created on 8 Mar 2018  路  6Comments  路  Source: microsoft/vscode

  • VSCode Version: 1.21
  • OS Version: Mac 10.12.16

Steps to Reproduce:

  1. Split editor mode should be in vertical mode
  2. Turn on centered layout with one tab, you should see it is centered
  3. Change split editor mode to horizontal mode
  4. The centered layout will no longer work until you switch back to vertical mode


Does this issue occur when all extensions are disabled?: Yes

bug layout verified

Most helpful comment

Thanks for figuring this out. I spent a while trying to figure out what the problem was. Thank to you, I changed splitting to vertical mode and now centered layout works.

I can affirm that this big is happening to me too. I'm on a mac as well.

All 6 comments

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

Thanks for figuring this out. I spent a while trying to figure out what the problem was. Thank to you, I changed splitting to vertical mode and now centered layout works.

I can affirm that this big is happening to me too. I'm on a mac as well.

@SrTobi I would expect centered mode to work if I have horizontal layout and only one editor. I tried removing the check to simply also enable it for horizontal layout but somehow the layout gets broken in that case.

I plan to fix this in the following week but just to let you know that a PR is more than welcome :)

@isidorn I just let you know that money is more than welcome :smile: Just kidding... I run on fun xD you shall have your PR :) it has the number #45671.

The problem was, that the available size was calculated by using silosSize[Position.ONE] which holds the height and not the width of the editor when in horizontal mode. You have to play around with it a little... it seemed to work but I did no deep testing or anything

As bonus I fixed two typos (one of whom I made myself :smile:)

@SrTobi thanks a lot for your PR, I just merged it in 馃嵒
I tried it out and it works nicely, also thanks for fixing typos.

For money feel free to apply for our internshipts if you are a student or to our open positions :)

@isidorn :smile: I'll finish university in 4 month... so... I might very well do that xD

Was this page helpful?
0 / 5 - 0 ratings