feat: shortcuts support override pre handlers like delete (#93)

This commit is contained in:
xiamidaxia 2025-03-26 15:26:30 +08:00 committed by GitHub
parent a039913a60
commit 62e53350f1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -43,7 +43,8 @@ export class ShortcutsRegistry {
});
}
});
this.shortcutsHandlers.push(...handlers);
// Insert before for override pre handlers
this.shortcutsHandlers.unshift(...handlers);
}
addHandlersIfNotFound(...handlers: ShortcutsHandler[]): void {