From 492caa7ac83df864da8f3058573dd67b524f0a6f Mon Sep 17 00:00:00 2001 From: gdh1995 Date: Sun, 22 Oct 2023 22:44:23 +0800 Subject: [PATCH] fix a logic typo --- front/vomnibar.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/front/vomnibar.ts b/front/vomnibar.ts index 821f812db..0a37d9b18 100644 --- a/front/vomnibar.ts +++ b/front/vomnibar.ts @@ -637,13 +637,14 @@ var VCID_: string | undefined = VCID_ || "", VHost_: string | undefined = VHost_ } return } - if (mainModifier === "a" || mainModifier === "m") { + if (mainModifier === "a" + || mainModifier === "m" && Build.OS & kBOS.MAC && (Build.OS === kBOS.MAC as number || !a.os_)) { ind = char >= "0" && char <= "9" ? +char || 10 : mapped || !(Build.BTypes & BrowserType.Firefox ? a.hasShift_(event as KeyboardEvent) : event.shiftKey) ? -1 : event.code ? event.code.startsWith("Digit") ? +event.code.slice(5) || 10 : -1 : n > kKeyCode.maxNotNum && n < kKeyCode.minNotNum ? (n - kKeyCode.N0) || 10 : -1 if (ind >= 0 && (!(Build.OS & kBOS.MAC) || Build.OS !== kBOS.MAC as number && a.os_ - || mainModifier === "a" && ( /[cm]-/).test(key))) { + || mainModifier === "m" || ( /[cm]-/).test(key))) { if (ind <= a.completions_.length) { a.onEnter_(char >= "0" && char <= "9" ? true : -2, ind - 1) } return }