()
| 162 | let numTimer: ReturnType<typeof setTimeout> | undefined; |
| 163 | |
| 164 | const commitNumBuf = (): void => { |
| 165 | if (numBuf) { |
| 166 | const n = parseInt(numBuf, 10); |
| 167 | if (n >= 1 && n <= options.length) { idx = n - 1; render(); } |
| 168 | numBuf = ''; |
| 169 | } |
| 170 | }; |
| 171 | |
| 172 | const onKey = (_str: string, key: { name?: string; ctrl?: boolean } | undefined): void => { |
| 173 | if (!key) return; |