@@ -1335,30 +1335,29 @@ export class EditorGroupView extends Themable implements IEditorGroupView {
1335
1335
}
1336
1336
1337
1337
private doCloseEditor ( editor : EditorInput , focusNext = ( this . accessor . activeGroup === this ) , internalOptions ?: IInternalEditorCloseOptions ) : void {
1338
- let index : number | undefined ;
1339
1338
1340
1339
// Forward to title control unless skipped via internal options
1341
1340
if ( ! internalOptions ?. skipTitleUpdate ) {
1342
- this . titleAreaControl . beforeCloseEditor ( editor , index ) ;
1341
+ this . titleAreaControl . beforeCloseEditor ( editor ) ;
1343
1342
}
1344
1343
1345
1344
// Closing the active editor of the group is a bit more work
1346
1345
if ( this . model . isActive ( editor ) ) {
1347
- index = this . doCloseActiveEditor ( focusNext , internalOptions ) ;
1346
+ this . doCloseActiveEditor ( focusNext , internalOptions ) ;
1348
1347
}
1349
1348
1350
1349
// Closing inactive editor is just a model update
1351
1350
else {
1352
- index = this . doCloseInactiveEditor ( editor , internalOptions ) ;
1351
+ this . doCloseInactiveEditor ( editor , internalOptions ) ;
1353
1352
}
1354
1353
1355
1354
// Forward to title control unless skipped via internal options
1356
1355
if ( ! internalOptions ?. skipTitleUpdate ) {
1357
- this . titleAreaControl . closeEditor ( editor , index ) ;
1356
+ this . titleAreaControl . closeEditor ( editor ) ;
1358
1357
}
1359
1358
}
1360
1359
1361
- private doCloseActiveEditor ( focusNext = ( this . accessor . activeGroup === this ) , internalOptions ?: IInternalEditorCloseOptions ) : number | undefined {
1360
+ private doCloseActiveEditor ( focusNext = ( this . accessor . activeGroup === this ) , internalOptions ?: IInternalEditorCloseOptions ) : void {
1362
1361
const editorToClose = this . activeEditor ;
1363
1362
const restoreFocus = this . shouldRestoreFocus ( this . element ) ;
1364
1363
@@ -1383,9 +1382,8 @@ export class EditorGroupView extends Themable implements IEditorGroupView {
1383
1382
}
1384
1383
1385
1384
// Update model
1386
- let index : number | undefined = undefined ;
1387
1385
if ( editorToClose ) {
1388
- index = this . model . closeEditor ( editorToClose , internalOptions ?. context ) ?. editorIndex ;
1386
+ this . model . closeEditor ( editorToClose , internalOptions ?. context ) ;
1389
1387
}
1390
1388
1391
1389
// Open next active if there are more to show
@@ -1437,8 +1435,6 @@ export class EditorGroupView extends Themable implements IEditorGroupView {
1437
1435
this . accessor . removeGroup ( this ) ;
1438
1436
}
1439
1437
}
1440
-
1441
- return index ;
1442
1438
}
1443
1439
1444
1440
private shouldRestoreFocus ( target : Element ) : boolean {
@@ -1452,10 +1448,10 @@ export class EditorGroupView extends Themable implements IEditorGroupView {
1452
1448
return isAncestor ( activeElement , target ) ;
1453
1449
}
1454
1450
1455
- private doCloseInactiveEditor ( editor : EditorInput , internalOptions ?: IInternalEditorCloseOptions ) : number | undefined {
1451
+ private doCloseInactiveEditor ( editor : EditorInput , internalOptions ?: IInternalEditorCloseOptions ) : void {
1456
1452
1457
1453
// Update model
1458
- return this . model . closeEditor ( editor , internalOptions ?. context ) ?. editorIndex ;
1454
+ this . model . closeEditor ( editor , internalOptions ?. context ) ;
1459
1455
}
1460
1456
1461
1457
private async handleCloseConfirmation ( editors : EditorInput [ ] ) : Promise < boolean /* veto */ > {
0 commit comments