* Resizes the terminal. * * @param x The number of columns to resize to. * @param y The number of rows to resize to.
(x: number, y: number)
| 1219 | * @param y The number of rows to resize to. |
| 1220 | */ |
| 1221 | public resize(x: number, y: number): void { |
| 1222 | if (x === this.cols && y === this.rows) { |
| 1223 | // Check if we still need to measure the char size (fixes #785). |
| 1224 | if (this._charSizeService && !this._charSizeService.hasValidSize) { |
| 1225 | this._charSizeService.measure(); |
| 1226 | } |
| 1227 | return; |
| 1228 | } |
| 1229 | |
| 1230 | super.resize(x, y); |
| 1231 | } |
| 1232 | |
| 1233 | private _afterResize(x: number, y: number): void { |
| 1234 | this._charSizeService?.measure(); |