@@ -329,24 +329,31 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
329329 }
330330} ) ;
331331
332- KeybindingsRegistry . registerCommandAndKeybindingRule ( {
332+ // commands that aren't needed anymore because there is now ContextKeyExpr.OR
333+ CommandsRegistry . registerCommandAlias ( 'goToNextReferenceFromEmbeddedEditor' , 'goToNextReference' ) ;
334+ CommandsRegistry . registerCommandAlias ( 'goToPreviousReferenceFromEmbeddedEditor' , 'goToPreviousReference' ) ;
335+
336+ // close
337+ CommandsRegistry . registerCommandAlias ( 'closeReferenceSearchEditor' , 'closeReferenceSearch' ) ;
338+ CommandsRegistry . registerCommand (
339+ 'closeReferenceSearch' ,
340+ accessor => withController ( accessor , controller => controller . closeWidget ( ) )
341+ ) ;
342+ KeybindingsRegistry . registerKeybindingRule ( {
333343 id : 'closeReferenceSearch' ,
334344 weight : KeybindingWeight . EditorContrib - 101 ,
335345 primary : KeyCode . Escape ,
336346 secondary : [ KeyMod . Shift | KeyCode . Escape ] ,
337- when : ContextKeyExpr . or (
338- ContextKeyExpr . and ( ctxReferenceSearchVisible , ContextKeyExpr . not ( 'config.editor.stablePeek' ) ) ,
339- ContextKeyExpr . and ( PeekContext . inPeekEditor , ContextKeyExpr . not ( 'config.editor.stablePeek' ) )
340- ) ,
341- handler ( accessor : ServicesAccessor ) {
342- withController ( accessor , controller => controller . closeWidget ( ) ) ;
343- }
347+ when : ContextKeyExpr . and ( PeekContext . inPeekEditor , ContextKeyExpr . not ( 'config.editor.stablePeek' ) )
348+ } ) ;
349+ KeybindingsRegistry . registerKeybindingRule ( {
350+ id : 'closeReferenceSearch' ,
351+ weight : KeybindingWeight . WorkbenchContrib + 50 ,
352+ primary : KeyCode . Escape ,
353+ secondary : [ KeyMod . Shift | KeyCode . Escape ] ,
354+ when : ContextKeyExpr . and ( ctxReferenceSearchVisible , ContextKeyExpr . not ( 'config.editor.stablePeek' ) )
344355} ) ;
345356
346- // commands that aren't needed anymore because there is now ContextKeyExpr.OR
347- CommandsRegistry . registerCommandAlias ( 'goToNextReferenceFromEmbeddedEditor' , 'goToNextReference' ) ;
348- CommandsRegistry . registerCommandAlias ( 'goToPreviousReferenceFromEmbeddedEditor' , 'goToPreviousReference' ) ;
349- CommandsRegistry . registerCommandAlias ( 'closeReferenceSearchEditor' , 'closeReferenceSearch' ) ;
350357
351358KeybindingsRegistry . registerCommandAndKeybindingRule ( {
352359 id : 'openReferenceToSide' ,
0 commit comments