MCPcopy Create free account
hub / github.com/codeaashu/claude-code / _refreshDecorations

Method _refreshDecorations

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

Source from the content-addressed store, hash-verified

1077 this._canvas.style.width = `${this._width}px`, this._canvas.width = Math.round(this._width * this._coreBrowserService.dpr), this._canvas.style.height = `${this._screenElement.clientHeight}px`, this._canvas.height = Math.round(this._screenElement.clientHeight * this._coreBrowserService.dpr), this._refreshDrawConstants(), this._refreshColorZonePadding();
1078 }
1079 _refreshDecorations() {
1080 this._shouldUpdateDimensions && this._refreshCanvasDimensions(), this._ctx.clearRect(0, 0, this._canvas.width, this._canvas.height), this._colorZoneStore.clear();
1081 for (const e4 of this._decorationService.decorations) this._colorZoneStore.addDecoration(e4);
1082 this._ctx.lineWidth = 1;
1083 const e3 = this._colorZoneStore.zones;
1084 for (const t3 of e3) "full" !== t3.position && this._renderColorZone(t3);
1085 for (const t3 of e3) "full" === t3.position && this._renderColorZone(t3);
1086 this._shouldUpdateDimensions = false, this._shouldUpdateAnchor = false;
1087 }
1088 _renderColorZone(e3) {
1089 this._ctx.fillStyle = e3.color, this._ctx.fillRect(d[e3.position || "full"], Math.round((this._canvas.height - 1) * (e3.startBufferLine / this._bufferService.buffers.active.lines.length) - c[e3.position || "full"] / 2), l[e3.position || "full"], Math.round((this._canvas.height - 1) * ((e3.endBufferLine - e3.startBufferLine) / this._bufferService.buffers.active.lines.length) + c[e3.position || "full"]));
1090 }

Callers 1

_queueRefreshMethod · 0.80

Calls 4

addDecorationMethod · 0.80
_renderColorZoneMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected