Skip to content

Commit 88440bd

Browse files
committed
Fixed issue with creating a new sash
1 parent 2f9ac60 commit 88440bd

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

  • src/vs

src/vs/base/browser/ui/sash/sash.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { getElementsByTagName, EventHelper, createStyleSheet, addDisposableListe
1414
import { domEvent } from 'vs/base/browser/event';
1515

1616
const DEBUG = false;
17+
let newSashSize = 4;
1718

1819
export interface ISashLayoutProvider { }
1920

@@ -58,16 +59,16 @@ export const enum SashState {
5859
const _onDidChangeGlobalSize = new Emitter<number>();
5960
const onDidChangeGlobalSize: Event<number> = _onDidChangeGlobalSize.event;
6061
export function setGlobalSashSize(size: number): void {
62+
newSashSize = size;
6163
_onDidChangeGlobalSize.fire(size);
6264
}
6365

6466
export class Sash extends Disposable {
65-
private size: number = 0;
66-
6767
private el: HTMLElement;
6868
private layoutProvider: ISashLayoutProvider;
6969
private hidden: boolean;
7070
private orientation!: Orientation;
71+
private size: number = newSashSize;
7172

7273
private _state: SashState = SashState.Enabled;
7374
get state(): SashState { return this._state; }

src/vs/workbench/contrib/sash/browser/sash.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export class SashSizeController extends Disposable implements IWorkbenchContribu
2424
super();
2525

2626
this.stylesheet = createStyleSheet();
27-
this._register(toDisposable(() => this.stylesheet.parentElement!.removeChild(this.stylesheet)));
27+
this._register(toDisposable(() => this.stylesheet.remove()));
2828

2929
const onDidChangeSizeConfiguration = Event.filter(configurationService.onDidChangeConfiguration, e => e.affectsConfiguration(this.configurationName));
3030
this._register(onDidChangeSizeConfiguration(this.onDidChangeSizeConfiguration, this));

0 commit comments

Comments
 (0)