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

Method _updateRectangle

src/server/web/public/terminal.js:6973–6997  ·  view source on GitHub ↗
(e3, t3, i3, s3, r2, o2, a2)

Source from the content-addressed store, hash-verified

6971 const t3 = this._verticesCursor, i3 = e3.cursor;
6972 if (!i3 || "block" === i3.style) return void (t3.count = 0);
6973 let s3, r2 = 0;
6974 "bar" !== i3.style && "outline" !== i3.style || (s3 = 8 * r2++, this._addRectangleFloat(t3.attributes, s3, i3.x * this._dimensions.device.cell.width, i3.y * this._dimensions.device.cell.height, "bar" === i3.style ? i3.dpr * i3.cursorWidth : i3.dpr, this._dimensions.device.cell.height, this._cursorFloat)), "underline" !== i3.style && "outline" !== i3.style || (s3 = 8 * r2++, this._addRectangleFloat(t3.attributes, s3, i3.x * this._dimensions.device.cell.width, (i3.y + 1) * this._dimensions.device.cell.height - i3.dpr, i3.width * this._dimensions.device.cell.width, i3.dpr, this._cursorFloat)), "outline" === i3.style && (s3 = 8 * r2++, this._addRectangleFloat(t3.attributes, s3, i3.x * this._dimensions.device.cell.width, i3.y * this._dimensions.device.cell.height, i3.width * this._dimensions.device.cell.width, i3.dpr, this._cursorFloat), s3 = 8 * r2++, this._addRectangleFloat(t3.attributes, s3, (i3.x + i3.width) * this._dimensions.device.cell.width - i3.dpr, i3.y * this._dimensions.device.cell.height, i3.dpr, this._dimensions.device.cell.height, this._cursorFloat)), t3.count = r2;
6975 }
6976 _updateRectangle(e3, t3, i3, s3, r2, o2, a2) {
6977 if (67108864 & i3) switch (50331648 & i3) {
6978 case 16777216:
6979 case 33554432:
6980 l = this._themeService.colors.ansi[255 & i3].rgba;
6981 break;
6982 case 50331648:
6983 l = (16777215 & i3) << 8;
6984 break;
6985 default:
6986 l = this._themeService.colors.foreground.rgba;
6987 }
6988 else switch (50331648 & s3) {
6989 case 16777216:
6990 case 33554432:
6991 l = this._themeService.colors.ansi[255 & s3].rgba;
6992 break;
6993 case 50331648:
6994 l = (16777215 & s3) << 8;
6995 break;
6996 default:
6997 l = this._themeService.colors.background.rgba;
6998 }
6999 e3.attributes.length < t3 + 4 && (e3.attributes = (0, n.expandFloat32Array)(e3.attributes, this._terminal.rows * this._terminal.cols * 8)), c = r2 * this._dimensions.device.cell.width, d = a2 * this._dimensions.device.cell.height, _ = (l >> 24 & 255) / 255, u = (l >> 16 & 255) / 255, g = (l >> 8 & 255) / 255, v = 1, this._addRectangle(e3.attributes, t3, c, d, (o2 - r2) * this._dimensions.device.cell.width, this._dimensions.device.cell.height, _, u, g, v);
7000 }

Callers 1

updateBackgroundsMethod · 0.95

Calls 1

_addRectangleMethod · 0.95

Tested by

no test coverage detected