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

Method addDecoration

src/server/web/public/terminal.js:999–1008  ·  view source on GitHub ↗
(e3)

Source from the content-addressed store, hash-verified

997 this._zones.length = 0, this._zonePoolIndex = 0;
998 }
999 addDecoration(e3) {
1000 if (e3.options.overviewRulerOptions) {
1001 for (const t3 of this._zones) if (t3.color === e3.options.overviewRulerOptions.color && t3.position === e3.options.overviewRulerOptions.position) {
1002 if (this._lineIntersectsZone(t3, e3.marker.line)) return;
1003 if (this._lineAdjacentToZone(t3, e3.marker.line, e3.options.overviewRulerOptions.position)) return void this._addLineToZone(t3, e3.marker.line);
1004 }
1005 if (this._zonePoolIndex < this._zonePool.length) return this._zonePool[this._zonePoolIndex].color = e3.options.overviewRulerOptions.color, this._zonePool[this._zonePoolIndex].position = e3.options.overviewRulerOptions.position, this._zonePool[this._zonePoolIndex].startBufferLine = e3.marker.line, this._zonePool[this._zonePoolIndex].endBufferLine = e3.marker.line, void this._zones.push(this._zonePool[this._zonePoolIndex++]);
1006 this._zones.push({ color: e3.options.overviewRulerOptions.color, position: e3.options.overviewRulerOptions.position, startBufferLine: e3.marker.line, endBufferLine: e3.marker.line }), this._zonePool.push(this._zones[this._zones.length - 1]), this._zonePoolIndex++;
1007 }
1008 }
1009 setPadding(e3) {
1010 this._linePadding = e3;
1011 }

Callers 1

_refreshDecorationsMethod · 0.80

Calls 4

_lineIntersectsZoneMethod · 0.80
_lineAdjacentToZoneMethod · 0.80
_addLineToZoneMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected