|
4 | 4 | *--------------------------------------------------------------------------------------------*/ |
5 | 5 |
|
6 | 6 | import 'vs/css!./splitview'; |
7 | | -import { IDisposable, combinedDisposable, toDisposable, Disposable } from 'vs/base/common/lifecycle'; |
| 7 | +import { IDisposable, toDisposable, Disposable, combinedDisposable } from 'vs/base/common/lifecycle'; |
8 | 8 | import { Event, Emitter } from 'vs/base/common/event'; |
9 | 9 | import * as types from 'vs/base/common/types'; |
10 | 10 | import * as dom from 'vs/base/browser/dom'; |
@@ -199,7 +199,7 @@ export class SplitView extends Disposable { |
199 | 199 |
|
200 | 200 | const onChangeDisposable = view.onDidChange(size => this.onViewChange(item, size)); |
201 | 201 | const containerDisposable = toDisposable(() => this.viewContainer.removeChild(container)); |
202 | | - const disposable = combinedDisposable([onChangeDisposable, containerDisposable]); |
| 202 | + const disposable = combinedDisposable(onChangeDisposable, containerDisposable); |
203 | 203 |
|
204 | 204 | const layoutContainer = this.orientation === Orientation.VERTICAL |
205 | 205 | ? () => item.container.style.height = `${item.size}px` |
@@ -245,7 +245,7 @@ export class SplitView extends Disposable { |
245 | 245 | const onEndDisposable = onEnd(this.onSashEnd, this); |
246 | 246 | const onDidResetDisposable = sash.onDidReset(() => this._onDidSashReset.fire(firstIndex(this.sashItems, item => item.sash === sash))); |
247 | 247 |
|
248 | | - const disposable = combinedDisposable([onStartDisposable, onChangeDisposable, onEndDisposable, onDidResetDisposable, sash]); |
| 248 | + const disposable = combinedDisposable(onStartDisposable, onChangeDisposable, onEndDisposable, onDidResetDisposable, sash); |
249 | 249 | const sashItem: ISashItem = { sash, disposable }; |
250 | 250 |
|
251 | 251 | this.sashItems.splice(index - 1, 0, sashItem); |
@@ -369,10 +369,10 @@ export class SplitView extends Disposable { |
369 | 369 | const index = firstIndex(this.sashItems, item => item.sash === sash); |
370 | 370 |
|
371 | 371 | // This way, we can press Alt while we resize a sash, macOS style! |
372 | | - const disposable = combinedDisposable([ |
| 372 | + const disposable = combinedDisposable( |
373 | 373 | domEvent(document.body, 'keydown')(e => resetSashDragState(this.sashDragState.current, e.altKey)), |
374 | 374 | domEvent(document.body, 'keyup')(() => resetSashDragState(this.sashDragState.current, false)) |
375 | | - ]); |
| 375 | + ); |
376 | 376 |
|
377 | 377 | const resetSashDragState = (start: number, alt: boolean) => { |
378 | 378 | const sizes = this.viewItems.map(i => i.size); |
|
0 commit comments