SCM - fix context key for clearing the input (#215341)

This commit is contained in:
Ladislau Szomoru 2024-06-12 21:25:03 +02:00 committed by GitHub
parent b0a60ae2da
commit 7392790e74
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -386,7 +386,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
KeybindingsRegistry.registerCommandAndKeybindingRule({
id: 'scm.clearInput',
weight: KeybindingWeight.WorkbenchContrib,
when: ContextKeyExpr.has('scmRepository'),
when: ContextKeyExpr.and(ContextKeyExpr.has('scmRepository'), SuggestContext.Visible.toNegated()),
primary: KeyCode.Escape,
handler: async (accessor) => {
const scmService = accessor.get(ISCMService);