@@ -9,7 +9,7 @@ import { Event, Emitter } from 'vs/base/common/event';
99import * as types from 'vs/base/common/types' ;
1010import * as dom from 'vs/base/browser/dom' ;
1111import { clamp } from 'vs/base/common/numbers' ;
12- import { range , firstIndex , pushToStart , pushToEnd } from 'vs/base/common/arrays' ;
12+ import { range , pushToStart , pushToEnd } from 'vs/base/common/arrays' ;
1313import { Sash , Orientation , ISashEvent as IBaseSashEvent , SashState } from 'vs/base/browser/ui/sash/sash' ;
1414import { Color } from 'vs/base/common/color' ;
1515import { domEvent } from 'vs/base/browser/event' ;
@@ -460,7 +460,7 @@ export class SplitView<TLayoutContext = undefined> extends Disposable {
460460 item . enabled = false ;
461461 }
462462
463- const index = firstIndex ( this . sashItems , item => item . sash === sash ) ;
463+ const index = this . sashItems . findIndex ( item => item . sash === sash ) ;
464464
465465 // This way, we can press Alt while we resize a sash, macOS style!
466466 const disposable = combinedDisposable (
@@ -709,11 +709,11 @@ export class SplitView<TLayoutContext = undefined> extends Disposable {
709709 const onStartDisposable = onStart ( this . onSashStart , this ) ;
710710 const onChange = Event . map ( sash . onDidChange , sashEventMapper ) ;
711711 const onChangeDisposable = onChange ( this . onSashChange , this ) ;
712- const onEnd = Event . map ( sash . onDidEnd , ( ) => firstIndex ( this . sashItems , item => item . sash === sash ) ) ;
712+ const onEnd = Event . map ( sash . onDidEnd , ( ) => this . sashItems . findIndex ( item => item . sash === sash ) ) ;
713713 const onEndDisposable = onEnd ( this . onSashEnd , this ) ;
714714
715715 const onDidResetDisposable = sash . onDidReset ( ( ) => {
716- const index = firstIndex ( this . sashItems , item => item . sash === sash ) ;
716+ const index = this . sashItems . findIndex ( item => item . sash === sash ) ;
717717 const upIndexes = range ( index , - 1 ) ;
718718 const downIndexes = range ( index + 1 , this . viewItems . length ) ;
719719 const snapBeforeIndex = this . findFirstSnapIndex ( upIndexes ) ;
0 commit comments