MCPcopy Create free account
hub / github.com/wavetermdev/waveterm / handleResize

Method handleResize

frontend/app/view/term/termwrap.ts:569–588  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

567 }
568
569 handleResize() {
570 const oldRows = this.terminal.rows;
571 const oldCols = this.terminal.cols;
572 this.fitAddon.fit();
573 if (oldRows !== this.terminal.rows || oldCols !== this.terminal.cols) {
574 const termSize: TermSize = { rows: this.terminal.rows, cols: this.terminal.cols };
575 console.log(
576 "[termwrap] resize",
577 `${oldRows}x${oldCols}`,
578 "->",
579 `${this.terminal.rows}x${this.terminal.cols}`
580 );
581 RpcApi.ControllerInputCommand(TabRpcClient, { blockid: this.blockId, termsize: termSize });
582 }
583 dlog("resize", `${this.terminal.rows}x${this.terminal.cols}`, `${oldRows}x${oldCols}`, this.hasResized);
584 if (!this.hasResized) {
585 this.hasResized = true;
586 this.resyncController("initial resize");
587 }
588 }
589
590 processAndCacheData() {
591 if (this.dataBytesProcessed < MinDataProcessedForCache) {

Callers 1

constructorMethod · 0.95

Calls 3

resyncControllerMethod · 0.95
fitMethod · 0.80

Tested by

no test coverage detected