mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 21:55:38 +00:00
Merge pull request #197581 from microsoft/merogge/simple-bug
allow taking notification action on first / default
This commit is contained in:
commit
9527021b45
|
@ -164,11 +164,11 @@ export function registerNotificationCommands(center: INotificationsCenterControl
|
|||
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: ACCEPT_PRIMARY_ACTION_NOTIFICATION,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: ContextKeyExpr.and(NotificationFocusedContext),
|
||||
when: ContextKeyExpr.or(NotificationFocusedContext, NotificationsToastsVisibleContext),
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyA,
|
||||
handler: (accessor) => {
|
||||
const actionRunner = accessor.get(IInstantiationService).createInstance(NotificationActionRunner);
|
||||
const notification = getNotificationFromContext(accessor.get(IListService));
|
||||
const notification = getNotificationFromContext(accessor.get(IListService)) || firstOrDefault(model.notifications);
|
||||
if (!notification) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue