MCPcopy Create free account
hub / github.com/modem-dev/hunk / renderAddNoteSpacer

Function renderAddNoteSpacer

src/ui/diff/renderRows.tsx:1267–1279  ·  view source on GitHub ↗

Fill the reserved wrapped-row hover column so row backgrounds do not visibly shrink.

(key: string, width: number, bg: string)

Source from the content-addressed store, hash-verified

1265
1266/** Fill the reserved wrapped-row hover column so row backgrounds do not visibly shrink. */
1267function renderAddNoteSpacer(key: string, width: number, bg: string) {
1268 if (width <= 0) {
1269 return null;
1270 }
1271
1272 return (
1273 <box key={key} style={{ width, height: 1 }}>
1274 <text>
1275 <span bg={bg}>{" ".repeat(width)}</span>
1276 </text>
1277 </box>
1278 );
1279}
1280
1281/** Measure how many terminal rows one rendered diff row occupies. */
1282export function measureRenderedRowHeight(

Callers 1

renderRowFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected