mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-17 13:50:46 +01:00
Add command to rerun search editor query
This commit is contained in:
@@ -12,6 +12,7 @@ export const ToggleSearchEditorCaseSensitiveCommandId = 'toggleSearchEditorCaseS
|
||||
export const ToggleSearchEditorWholeWordCommandId = 'toggleSearchEditorWholeWord';
|
||||
export const ToggleSearchEditorRegexCommandId = 'toggleSearchEditorRegex';
|
||||
export const ToggleSearchEditorContextLinesCommandId = 'toggleSearchEditorContextLines';
|
||||
export const RerunSearchEditorSearchCommandId = 'rerunSearchEditorSearch';
|
||||
|
||||
export const InSearchEditor = new RawContextKey<boolean>('inSearchEditor', false);
|
||||
|
||||
|
||||
@@ -145,6 +145,15 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
primary: KeyMod.Alt | KeyCode.KEY_L,
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_L }
|
||||
});
|
||||
|
||||
CommandsRegistry.registerCommand(
|
||||
SearchEditorConstants.RerunSearchEditorSearchCommandId,
|
||||
(accessor: ServicesAccessor) => {
|
||||
const activeControl = accessor.get(IEditorService).activeControl;
|
||||
if (activeControl instanceof SearchEditor) {
|
||||
activeControl.triggerSearch({ resetCursor: false });
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
|
||||
//#region Actions
|
||||
|
||||
Reference in New Issue
Block a user