()
| 388 | |
| 389 | // Called after rapid input timer expires to collapse or insert buffered content |
| 390 | private finalizeRapidInput(): void { |
| 391 | if (this._rapidInputBuffer.length > COLLAPSE_SIZE) { |
| 392 | const placeholder = this.createPlaceholder(this._rapidInputBuffer); |
| 393 | this._pasteMap.set(placeholder, this._rapidInputBuffer); |
| 394 | |
| 395 | this._text = |
| 396 | this._text.slice(0, this._rapidInputStartPos) + |
| 397 | placeholder + |
| 398 | this._text.slice(this._rapidInputStartPos); |
| 399 | this._cursor = this._rapidInputStartPos + placeholder.length; |
| 400 | |
| 401 | if (this._onStateChange) { |
| 402 | this._onStateChange(); |
| 403 | } |
| 404 | } else { |
| 405 | this.insertText(this._rapidInputBuffer); |
| 406 | |
| 407 | if (this._onStateChange) { |
| 408 | this._onStateChange(); |
| 409 | } |
| 410 | } |
| 411 | |
| 412 | this._rapidInputBuffer = ""; |
| 413 | this._rapidInputStartPos = 0; |
| 414 | this._rapidInputTimer = null; |
| 415 | } |
| 416 | |
| 417 | private handleOptionKey(sequence: string): boolean { |
| 418 | // Option + backspace (usually \u001b\u0008 or \u001b\u007f) |
no test coverage detected