MCPcopy
hub / github.com/xtermjs/xterm.js / resize

Method resize

src/browser/CoreBrowserTerminal.ts:1221–1231  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

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();

Callers

nothing calls this directly

Calls 2

measureMethod · 0.65
resizeMethod · 0.65

Tested by

no test coverage detected