(data: string)
| 881 | } |
| 882 | |
| 883 | private consumeCellSizeResponse(data: string): boolean { |
| 884 | // Response format: ESC [ 6 ; height ; width t |
| 885 | const match = data.match(/^\x1b\[6;(\d+);(\d+)t$/); |
| 886 | if (!match) { |
| 887 | return false; |
| 888 | } |
| 889 | |
| 890 | const heightPx = parseInt(match[1]!, 10); |
| 891 | const widthPx = parseInt(match[2]!, 10); |
| 892 | if (heightPx <= 0 || widthPx <= 0) { |
| 893 | return true; |
| 894 | } |
| 895 | |
| 896 | setCellDimensions({ widthPx, heightPx }); |
| 897 | // Invalidate all components so images re-render with correct dimensions. |
| 898 | this.invalidate(); |
| 899 | this.requestRender(); |
| 900 | return true; |
| 901 | } |
| 902 | |
| 903 | /** |
| 904 | * Resolve overlay layout from options. |
no test coverage detected