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

Function joinRows

src/ink/selection.ts:750–760  ·  view source on GitHub ↗

Accumulator for selected text that merges soft-wrapped rows back * into logical lines. push(text, sw) appends a newline before text * only when sw=false (i.e. the row starts a new logical line). Rows * with sw=true are concatenated onto the previous row.

(
  lines: string[],
  text: string,
  sw: boolean | undefined,
)

Source from the content-addressed store, hash-verified

748 * only when sw=false (i.e. the row starts a new logical line). Rows
749 * with sw=true are concatenated onto the previous row. */
750function joinRows(
751 lines: string[],
752 text: string,
753 sw: boolean | undefined,
754): void {
755 if (sw && lines.length > 0) {
756 lines[lines.length - 1] += text
757 } else {
758 lines.push(text)
759 }
760}
761
762/**
763 * Extract text from the screen buffer within the selection range.

Callers 1

getSelectedTextFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected