MCPcopy Index your code
hub / github.com/codeaashu/claude-code / resize

Method resize

src/server/web/public/terminal.js:4137–4161  ·  view source on GitHub ↗
(e3, t3)

Source from the content-addressed store, hash-verified

4135 else for (e3 && 2 === this.getWidth(e3 - 1) && this.setCellFromCodepoint(e3 - 1, 0, 1, i3), t3 < this.length && 2 === this.getWidth(t3 - 1) && this.setCellFromCodepoint(t3, 0, 1, i3); e3 < t3 && e3 < this.length; ) this.setCell(e3++, i3);
4136 }
4137 resize(e3, t3) {
4138 if (e3 === this.length) return 4 * this._data.length * 2 < this._data.buffer.byteLength;
4139 const i3 = 3 * e3;
4140 if (e3 > this.length) {
4141 if (this._data.buffer.byteLength >= 4 * i3) this._data = new Uint32Array(this._data.buffer, 0, i3);
4142 else {
4143 const e4 = new Uint32Array(i3);
4144 e4.set(this._data), this._data = e4;
4145 }
4146 for (let i4 = this.length; i4 < e3; ++i4) this.setCell(i4, t3);
4147 } else {
4148 this._data = this._data.subarray(0, i3);
4149 const t4 = Object.keys(this._combined);
4150 for (let i4 = 0; i4 < t4.length; i4++) {
4151 const s4 = parseInt(t4[i4], 10);
4152 s4 >= e3 && delete this._combined[s4];
4153 }
4154 const s3 = Object.keys(this._extendedAttrs);
4155 for (let t5 = 0; t5 < s3.length; t5++) {
4156 const i4 = parseInt(s3[t5], 10);
4157 i4 >= e3 && delete this._extendedAttrs[i4];
4158 }
4159 }
4160 return this.length = e3, 4 * i3 * 2 < this._data.buffer.byteLength;
4161 }
4162 cleanupMemory() {
4163 if (4 * this._data.length * 2 < this._data.buffer.byteLength) {
4164 const e3 = new Uint32Array(this._data.length);

Callers

nothing calls this directly

Calls 3

setCellMethod · 0.95
keysMethod · 0.80
setMethod · 0.45

Tested by

no test coverage detected