@@ -24,6 +24,7 @@ import { IWorkspacesService } from 'vs/platform/workspaces/common/workspaces';
2424import { IFileDialogService , ConfirmResult } from 'vs/platform/dialogs/common/dialogs' ;
2525import { IWorkingCopyService } from 'vs/workbench/services/workingCopy/common/workingCopyService' ;
2626import { values } from 'vs/base/common/map' ;
27+ import { ItemActivation } from 'vs/platform/quickinput/common/quickInput' ;
2728
2829export class ExecuteCommandAction extends Action {
2930
@@ -1261,6 +1262,7 @@ export class BaseQuickOpenEditorAction extends Action {
12611262 id : string ,
12621263 label : string ,
12631264 private prefix : string ,
1265+ private itemActivation : ItemActivation | undefined ,
12641266 @IQuickOpenService private readonly quickOpenService : IQuickOpenService ,
12651267 @IKeybindingService private readonly keybindingService : IKeybindingService
12661268 ) {
@@ -1270,7 +1272,10 @@ export class BaseQuickOpenEditorAction extends Action {
12701272 async run ( ) : Promise < void > {
12711273 const keybindings = this . keybindingService . lookupKeybindings ( this . id ) ;
12721274
1273- this . quickOpenService . show ( this . prefix , { quickNavigateConfiguration : { keybindings } } ) ;
1275+ this . quickOpenService . show ( this . prefix , {
1276+ quickNavigateConfiguration : { keybindings } ,
1277+ autoFocus : this . itemActivation === ItemActivation . LAST ? { autoFocusLastEntry : true } : undefined
1278+ } ) ;
12741279 }
12751280}
12761281
@@ -1285,7 +1290,7 @@ export class QuickOpenPreviousRecentlyUsedEditorAction extends BaseQuickOpenEdit
12851290 @IQuickOpenService quickOpenService : IQuickOpenService ,
12861291 @IKeybindingService keybindingService : IKeybindingService
12871292 ) {
1288- super ( id , label , NAVIGATE_ALL_EDITORS_BY_MOST_RECENTLY_USED_PREFIX , quickOpenService , keybindingService ) ;
1293+ super ( id , label , NAVIGATE_ALL_EDITORS_BY_MOST_RECENTLY_USED_PREFIX , undefined , quickOpenService , keybindingService ) ;
12891294 }
12901295}
12911296
@@ -1300,7 +1305,7 @@ export class QuickOpenNextRecentlyUsedEditorAction extends BaseQuickOpenEditorAc
13001305 @IQuickOpenService quickOpenService : IQuickOpenService ,
13011306 @IKeybindingService keybindingService : IKeybindingService
13021307 ) {
1303- super ( id , label , NAVIGATE_ALL_EDITORS_BY_MOST_RECENTLY_USED_PREFIX , quickOpenService , keybindingService ) ;
1308+ super ( id , label , NAVIGATE_ALL_EDITORS_BY_MOST_RECENTLY_USED_PREFIX , undefined , quickOpenService , keybindingService ) ;
13041309 }
13051310}
13061311
@@ -1315,7 +1320,7 @@ export class QuickOpenPreviousRecentlyUsedEditorInGroupAction extends BaseQuickO
13151320 @IQuickOpenService quickOpenService : IQuickOpenService ,
13161321 @IKeybindingService keybindingService : IKeybindingService
13171322 ) {
1318- super ( id , label , NAVIGATE_IN_ACTIVE_GROUP_BY_MOST_RECENTLY_USED_PREFIX , quickOpenService , keybindingService ) ;
1323+ super ( id , label , NAVIGATE_IN_ACTIVE_GROUP_BY_MOST_RECENTLY_USED_PREFIX , undefined , quickOpenService , keybindingService ) ;
13191324 }
13201325}
13211326
@@ -1330,7 +1335,7 @@ export class QuickOpenLeastRecentlyUsedEditorInGroupAction extends BaseQuickOpen
13301335 @IQuickOpenService quickOpenService : IQuickOpenService ,
13311336 @IKeybindingService keybindingService : IKeybindingService
13321337 ) {
1333- super ( id , label , NAVIGATE_IN_ACTIVE_GROUP_BY_MOST_RECENTLY_USED_PREFIX , quickOpenService , keybindingService ) ;
1338+ super ( id , label , NAVIGATE_IN_ACTIVE_GROUP_BY_MOST_RECENTLY_USED_PREFIX , ItemActivation . LAST , quickOpenService , keybindingService ) ;
13341339 }
13351340}
13361341
0 commit comments