(input: string)
| 531 | } |
| 532 | |
| 533 | private handleTextInput(input: string): boolean { |
| 534 | // Direct paste detection: single large input - but delay insertion to catch split pastes |
| 535 | if (input.length > COLLAPSE_SIZE && this._rapidInputBuffer.length === 0) { |
| 536 | // Start rapid input mode immediately to delay placeholder creation |
| 537 | this._rapidInputStartPos = this._cursor; |
| 538 | this._rapidInputBuffer = input; |
| 539 | this._lastInputTime = Date.now(); |
| 540 | |
| 541 | if (this._rapidInputTimer) { |
| 542 | clearTimeout(this._rapidInputTimer); |
| 543 | } |
| 544 | |
| 545 | // Wait 250ms to see if more content comes (split paste) |
| 546 | this._rapidInputTimer = setTimeout(() => { |
| 547 | this.finalizeRapidInput(); |
| 548 | }, 250); |
| 549 | |
| 550 | return true; |
| 551 | } |
| 552 | |
| 553 | // Fallback: detect chunked paste operations |
| 554 | if (this.handleRapidInput(input)) { |
| 555 | return true; |
| 556 | } |
| 557 | |
| 558 | this.insertText(input); |
| 559 | return true; |
| 560 | } |
| 561 | |
| 562 | handleInput(input: string, key: Key): boolean { |
| 563 | // Handle bracketed paste sequences first |
no test coverage detected