@@ -412,7 +412,6 @@ export interface IOpenEvent<T> {
412412export interface IResourceNavigatorOptions {
413413 readonly configurationService ?: IConfigurationService ;
414414 readonly openOnFocus ?: boolean ;
415- readonly openOnSelection ?: boolean ;
416415 readonly openOnSingleClick ?: boolean ;
417416}
418417
@@ -430,7 +429,6 @@ export function getSelectionKeyboardEvent(typeArg = 'keydown', preserveFocus?: b
430429abstract class ResourceNavigator < T > extends Disposable {
431430
432431 private readonly openOnFocus : boolean ;
433- private readonly openOnSelection : boolean ;
434432 private openOnSingleClick : boolean ;
435433
436434 private readonly _onDidOpen = new Emitter < IOpenEvent < T | null > > ( ) ;
@@ -443,19 +441,15 @@ abstract class ResourceNavigator<T> extends Disposable {
443441 super ( ) ;
444442
445443 this . openOnFocus = options ?. openOnFocus ?? false ;
446- this . openOnSelection = options ?. openOnSelection ?? true ;
447444 this . openOnSingleClick = options ?. openOnSingleClick ?? true ;
448445
446+ this . _register ( this . widget . onDidChangeSelection ( e => this . onSelection ( e ) ) ) ;
447+ this . _register ( this . widget . onMouseDblClick ( ( e : { browserEvent : MouseEvent } ) => this . onMouseDblClick ( e . browserEvent ) ) ) ;
448+
449449 if ( this . openOnFocus ) {
450450 this . _register ( this . widget . onDidChangeFocus ( e => this . onFocus ( e . browserEvent ) ) ) ;
451451 }
452452
453- if ( this . openOnSelection ) {
454- this . _register ( this . widget . onDidChangeSelection ( e => this . onSelection ( e ) ) ) ;
455- }
456-
457- this . _register ( this . widget . onMouseDblClick ( ( e : { browserEvent : MouseEvent } ) => this . onMouseDblClick ( e . browserEvent ) ) ) ;
458-
459453 if ( typeof options ?. openOnSingleClick !== 'boolean' && options ?. configurationService ) {
460454 this . _register ( options ?. configurationService . onDidChangeConfiguration ( ( ) => {
461455 this . openOnSingleClick = options ?. configurationService ! . getValue ( openModeSettingKey ) !== 'doubleClick' ;
0 commit comments