MCPcopy
hub / github.com/codeaashu/claude-code / clear

Method clear

src/server/web/public/terminal.js:753–760  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

751 (_a = this._charSizeService) == null ? void 0 : _a.measure(), (_b = this.viewport) == null ? void 0 : _b.syncScrollArea(true);
752 }
753 clear() {
754 var _a;
755 if (0 !== this.buffer.ybase || 0 !== this.buffer.y) {
756 this.buffer.clearAllMarkers(), this.buffer.lines.set(0, this.buffer.lines.get(this.buffer.ybase + this.buffer.y)), this.buffer.lines.length = 1, this.buffer.ydisp = 0, this.buffer.ybase = 0, this.buffer.y = 0;
757 for (let e3 = 1; e3 < this.rows; e3++) this.buffer.lines.push(this.buffer.getBlankLine(L.DEFAULT_ATTR_DATA));
758 this._onScroll.fire({ position: this.buffer.ydisp, source: 0 }), (_a = this.viewport) == null ? void 0 : _a.reset(), this.refresh(0, this.rows - 1);
759 }
760 }
761 reset() {
762 var _a, _b;
763 this.options.rows = this.rows, this.options.cols = this.cols;

Callers

nothing calls this directly

Calls 8

refreshMethod · 0.95
clearAllMarkersMethod · 0.80
getBlankLineMethod · 0.80
fireMethod · 0.80
getMethod · 0.65
resetMethod · 0.65
setMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected