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

Function fixedWidthText

src/ui/staticDiffPager.ts:108–111  ·  view source on GitHub ↗
(text: string, width: number)

Source from the content-addressed store, hash-verified

106}
107
108function fixedWidthText(text: string, width: number) {
109 const visible = sliceTextByWidth(text, 0, width);
110 return `${visible.text}${" ".repeat(Math.max(0, width - visible.width))}`;
111}
112
113function staticStackGutterText(
114 cell: Extract<DiffRow, { type: "stack-line" }>["cell"],

Callers 1

renderStaticSplitCellFunction · 0.85

Calls 1

sliceTextByWidthFunction · 0.90

Tested by

no test coverage detected