Merge from vscode 81d7885dc2e9dc617e1522697a2966bc4025a45d (#5949)

* Merge from vscode 81d7885dc2e9dc617e1522697a2966bc4025a45d

* Fix vs unit tests and hygiene issue

* Fix strict null check issue
This commit is contained in:
Chris LaFreniere
2019-06-10 18:27:09 -07:00
committed by GitHub
parent ff38bc8143
commit d15a3fcc98
926 changed files with 19529 additions and 11383 deletions

View File

@@ -241,7 +241,7 @@ export class ScrollableSplitView extends HeightMap implements IDisposable {
}
this.onRemoveItems(new ArrayIterator([item.view.id!]));
});
const disposable = combinedDisposable([onChangeDisposable, containerDisposable]);
const disposable = combinedDisposable(onChangeDisposable, containerDisposable);
const onAdd = view.onAdd ? () => view.onAdd!() : () => { };
const onRemove = view.onRemove ? () => view.onRemove!() : () => { };
@@ -292,7 +292,7 @@ export class ScrollableSplitView extends HeightMap implements IDisposable {
const onEndDisposable = onEnd(this.onSashEnd, this);
const onDidResetDisposable = sash.onDidReset(() => this._onDidSashReset.fire(firstIndex(this.sashItems, item => item.sash === sash)));
const disposable = combinedDisposable([onStartDisposable, onChangeDisposable, onEndDisposable, onDidResetDisposable, sash]);
const disposable = combinedDisposable(onStartDisposable, onChangeDisposable, onEndDisposable, onDidResetDisposable, sash);
const sashItem: ISashItem = { sash, disposable };
this.sashItems.splice(currentIndex - 1, 0, sashItem);
@@ -344,7 +344,7 @@ export class ScrollableSplitView extends HeightMap implements IDisposable {
}
this.onRemoveItems(new ArrayIterator([item.view.id!]));
});
const disposable = combinedDisposable([onChangeDisposable, containerDisposable]);
const disposable = combinedDisposable(onChangeDisposable, containerDisposable);
const onAdd = view.onAdd ? () => view.onAdd!() : () => { };
const onRemove = view.onRemove ? () => view.onRemove!() : () => { };
@@ -395,7 +395,7 @@ export class ScrollableSplitView extends HeightMap implements IDisposable {
const onEndDisposable = onEnd(this.onSashEnd, this);
const onDidResetDisposable = sash.onDidReset(() => this._onDidSashReset.fire(firstIndex(this.sashItems, item => item.sash === sash)));
const disposable = combinedDisposable([onStartDisposable, onChangeDisposable, onEndDisposable, onDidResetDisposable, sash]);
const disposable = combinedDisposable(onStartDisposable, onChangeDisposable, onEndDisposable, onDidResetDisposable, sash);
const sashItem: ISashItem = { sash, disposable };
this.sashItems.splice(index - 1, 0, sashItem);
@@ -527,10 +527,10 @@ export class ScrollableSplitView extends HeightMap implements IDisposable {
const index = firstIndex(this.sashItems, item => item.sash === sash);
// This way, we can press Alt while we resize a sash, macOS style!
const disposable = combinedDisposable([
const disposable = combinedDisposable(
domEvent(document.body, 'keydown')(e => resetSashDragState(this.sashDragState.current, e.altKey)),
domEvent(document.body, 'keyup')(() => resetSashDragState(this.sashDragState.current, false))
]);
);
const resetSashDragState = (start: number, alt: boolean) => {
const sizes = this.viewItems.map(i => i.size);