This commit is contained in:
Wenfang Du 2021-11-26 20:27:16 +01:00 committed by GitHub
commit a141bde366
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -252,6 +252,21 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
}
});
KeybindingsRegistry.registerCommandAndKeybindingRule({
id: 'scm.clearMessage',
description: { description: localize('scm clear message', "SCM: Clear Message"), args: [] },
weight: KeybindingWeight.WorkbenchContrib,
when: ContextKeyExpr.has('scmRepository'),
primary: KeyCode.Escape,
handler: accessor => {
const contextKeyService = accessor.get(IContextKeyService);
const context = contextKeyService.getContext(document.activeElement);
const repository = context.getValue<ISCMRepository>('scmRepository');
repository?.input.setValue('', true)
}
});
const viewNextCommitCommand = {
description: { description: localize('scm view next commit', "SCM: View Next Commit"), args: [] },
weight: KeybindingWeight.WorkbenchContrib,