mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-11 14:04:49 -05:00
Rework workbench.action.searchEditor.deleteResultBlock into search.searchEditor.action.deleteFileResults
closes #100859
This commit is contained in:
@@ -81,19 +81,6 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
}
|
||||
});
|
||||
|
||||
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: 'workbench.action.searchEditor.deleteResultBlock',
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: SearchEditorConstants.InSearchEditor,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Backspace,
|
||||
handler: accessor => {
|
||||
const contextService = accessor.get(IContextKeyService).getContext(document.activeElement);
|
||||
if (contextService.getValue(SearchEditorConstants.InSearchEditor.serialize())) {
|
||||
(accessor.get(IEditorService).activeEditorPane as SearchEditor).deleteResultBlock();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: Constants.FocusSearchFromResults,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
|
||||
@@ -236,6 +236,30 @@ const openArgDescription = {
|
||||
}]
|
||||
} as const;
|
||||
|
||||
registerAction2(class extends Action2 {
|
||||
constructor() {
|
||||
super({
|
||||
id: 'search.searchEditor.action.deleteFileResults',
|
||||
title: localize('searchEditor.deleteResultBlock', "Delete File Results"),
|
||||
keybinding: {
|
||||
weight: KeybindingWeight.EditorContrib,
|
||||
when: SearchEditorConstants.InSearchEditor,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Backspace,
|
||||
},
|
||||
precondition: SearchEditorConstants.InSearchEditor,
|
||||
category,
|
||||
f1: true,
|
||||
});
|
||||
}
|
||||
|
||||
async run(accessor: ServicesAccessor) {
|
||||
const contextService = accessor.get(IContextKeyService).getContext(document.activeElement);
|
||||
if (contextService.getValue(SearchEditorConstants.InSearchEditor.serialize())) {
|
||||
(accessor.get(IEditorService).activeEditorPane as SearchEditor).deleteResultBlock();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
registerAction2(class extends Action2 {
|
||||
constructor() {
|
||||
super({
|
||||
|
||||
Reference in New Issue
Block a user