提交 83d0a4ce 编写于 作者: R Rob Lourens

Standardize 'replace' keyboard shortcut for all match types,

and include keyboard shortcut in label.
#45063
上级 2bdea158
......@@ -530,7 +530,7 @@ export class ReplaceAllInFolderAction extends AbstractSearchAndReplaceAction {
constructor(private viewer: ITree, private folderMatch: FolderMatch,
@IKeybindingService keyBindingService: IKeybindingService
) {
super(Constants.ReplaceAllInFolderActionId, nls.localize('file.replaceAll.label', "Replace All"), 'action-replace-all');
super(Constants.ReplaceAllInFolderActionId, appendKeyBindingLabel(nls.localize('file.replaceAll.label', "Replace All"), keyBindingService.lookupKeybinding(Constants.ReplaceAllInFolderActionId), keyBindingService), 'action-replace-all');
}
public async run(): TPromise<any> {
......
......@@ -130,7 +130,8 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
id: Constants.ReplaceActionId,
weight: KeybindingsRegistry.WEIGHT.workbenchContrib(),
when: ContextKeyExpr.and(Constants.SearchViewVisibleKey, Constants.ReplaceActiveKey, Constants.MatchFocusKey),
primary: KeyMod.Shift | KeyMod.CtrlCmd | KeyCode.KEY_1,
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Enter,
secondary: [KeyMod.Shift | KeyMod.CtrlCmd | KeyCode.KEY_1],
handler: (accessor, args: any) => {
const searchView = getSearchView(accessor.get(IViewletService), accessor.get(IPanelService));
const tree: ITree = searchView.getControl();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册