提交 1f3efeb0 编写于 作者: J Johannes Rieken

fix #88232

上级 f8233c9f
...@@ -329,24 +329,31 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({ ...@@ -329,24 +329,31 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
} }
}); });
KeybindingsRegistry.registerCommandAndKeybindingRule({ // commands that aren't needed anymore because there is now ContextKeyExpr.OR
CommandsRegistry.registerCommandAlias('goToNextReferenceFromEmbeddedEditor', 'goToNextReference');
CommandsRegistry.registerCommandAlias('goToPreviousReferenceFromEmbeddedEditor', 'goToPreviousReference');
// close
CommandsRegistry.registerCommandAlias('closeReferenceSearchEditor', 'closeReferenceSearch');
CommandsRegistry.registerCommand(
'closeReferenceSearch',
accessor => withController(accessor, controller => controller.closeWidget())
);
KeybindingsRegistry.registerKeybindingRule({
id: 'closeReferenceSearch', id: 'closeReferenceSearch',
weight: KeybindingWeight.EditorContrib - 101, weight: KeybindingWeight.EditorContrib - 101,
primary: KeyCode.Escape, primary: KeyCode.Escape,
secondary: [KeyMod.Shift | KeyCode.Escape], secondary: [KeyMod.Shift | KeyCode.Escape],
when: ContextKeyExpr.or( when: ContextKeyExpr.and(PeekContext.inPeekEditor, ContextKeyExpr.not('config.editor.stablePeek'))
ContextKeyExpr.and(ctxReferenceSearchVisible, ContextKeyExpr.not('config.editor.stablePeek')), });
ContextKeyExpr.and(PeekContext.inPeekEditor, ContextKeyExpr.not('config.editor.stablePeek')) KeybindingsRegistry.registerKeybindingRule({
), id: 'closeReferenceSearch',
handler(accessor: ServicesAccessor) { weight: KeybindingWeight.WorkbenchContrib + 50,
withController(accessor, controller => controller.closeWidget()); primary: KeyCode.Escape,
} secondary: [KeyMod.Shift | KeyCode.Escape],
when: ContextKeyExpr.and(ctxReferenceSearchVisible, ContextKeyExpr.not('config.editor.stablePeek'))
}); });
// commands that aren't needed anymore because there is now ContextKeyExpr.OR
CommandsRegistry.registerCommandAlias('goToNextReferenceFromEmbeddedEditor', 'goToNextReference');
CommandsRegistry.registerCommandAlias('goToPreviousReferenceFromEmbeddedEditor', 'goToPreviousReference');
CommandsRegistry.registerCommandAlias('closeReferenceSearchEditor', 'closeReferenceSearch');
KeybindingsRegistry.registerCommandAndKeybindingRule({ KeybindingsRegistry.registerCommandAndKeybindingRule({
id: 'openReferenceToSide', id: 'openReferenceToSide',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册