()
| 749 | } |
| 750 | |
| 751 | private scheduleRender(): void { |
| 752 | if (this.stopped || this.renderTimer || !this.renderRequested) { |
| 753 | return; |
| 754 | } |
| 755 | const elapsed = performance.now() - this.lastRenderAt; |
| 756 | const delay = Math.max(0, TUI.MIN_RENDER_INTERVAL_MS - elapsed); |
| 757 | this.renderTimer = setTimeout(() => { |
| 758 | this.renderTimer = undefined; |
| 759 | if (this.stopped || !this.renderRequested) { |
| 760 | return; |
| 761 | } |
| 762 | this.renderRequested = false; |
| 763 | this.lastRenderAt = performance.now(); |
| 764 | this.doRender(); |
| 765 | if (this.renderRequested) { |
| 766 | this.scheduleRender(); |
| 767 | } |
| 768 | }, delay); |
| 769 | } |
| 770 | |
| 771 | private handleInput(data: string): void { |
| 772 | if (this.consumeOsc11BackgroundResponse(data)) { |
no test coverage detected