Skip to content

Commit

Permalink
fix a logic typo
Browse files Browse the repository at this point in the history
  • Loading branch information
gdh1995 committed Oct 22, 2023
1 parent 40cb721 commit 492caa7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions front/vomnibar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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" && (<RegExpOne> /[cm]-/).test(key))) {
|| mainModifier === "m" || (<RegExpOne> /[cm]-/).test(key))) {
if (ind <= a.completions_.length) { a.onEnter_(char >= "0" && char <= "9" ? true : -2, ind - 1) }
return
}
Expand Down

0 comments on commit 492caa7

Please sign in to comment.