MCPcopy
hub / github.com/chenglou/pretext / emitCurrentLine

Function emitCurrentLine

src/line-break.ts:324–340  ·  view source on GitHub ↗
(
    endSegmentIndex = lineEndSegmentIndex,
    endGraphemeIndex = lineEndGraphemeIndex,
    width = lineW,
  )

Source from the content-addressed store, hash-verified

322 }
323
324 function emitCurrentLine(
325 endSegmentIndex = lineEndSegmentIndex,
326 endGraphemeIndex = lineEndGraphemeIndex,
327 width = lineW,
328 ): void {
329 lineCount++
330 onLine?.(
331 width,
332 lineStartSegmentIndex,
333 lineStartGraphemeIndex,
334 endSegmentIndex,
335 endGraphemeIndex,
336 )
337 lineW = 0
338 hasContent = false
339 clearPendingBreak()
340 }
341
342 function startLineAtSegment(segmentIndex: number, width: number): void {
343 hasContent = true

Callers 3

walkPreparedLinesSimpleFunction · 0.85
walkPreparedLinesRawFunction · 0.85

Calls 3

clearPendingBreakFunction · 0.85
finalizeLinePaintWidthFunction · 0.85
getCurrentLinePaintWidthFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…