fix: accept modified digits for multi-line sentence mining

This commit is contained in:
2026-04-27 20:14:09 -07:00
parent 5cc5df4b18
commit 6053a1b6ac
7 changed files with 259 additions and 11 deletions
+6 -2
View File
@@ -176,13 +176,17 @@ export function createKeyboardHandlers(
return true;
}
if (!/^[1-9]$/.test(e.key) || e.ctrlKey || e.metaKey || e.altKey || e.shiftKey) {
const digit = /^[1-9]$/.test(e.key)
? e.key
: (e.code.match(/^(?:Digit|Numpad)([1-9])$/)?.[1] ?? null);
if (!digit) {
e.preventDefault();
return true;
}
e.preventDefault();
const count = Number(e.key);
const count = Number(digit);
const actionId = pendingNumericSelection.actionId;
cancelPendingNumericSelection(false);
void window.electronAPI.dispatchSessionAction(actionId, { count });