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

Function lineWidthCells

src/utils/ansiToPng.ts:156–160  ·  view source on GitHub ↗

Terminal column width of a parsed line.

(line: ParsedLine)

Source from the content-addressed store, hash-verified

154
155/** Terminal column width of a parsed line. */
156function lineWidthCells(line: ParsedLine): number {
157 let w = 0
158 for (const span of line) w += stringWidth(span.text)
159 return w
160}
161
162function fillBackground(px: Uint8Array, bg: AnsiColor): void {
163 for (let i = 0; i < px.length; i += 4) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected