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

Method fromText

src/utils/Cursor.ts:162–170  ·  view source on GitHub ↗
(
    text: string,
    columns: number,
    offset: number = 0,
    selection: number = 0,
  )

Source from the content-addressed store, hash-verified

160 }
161
162 static fromText(
163 text: string,
164 columns: number,
165 offset: number = 0,
166 selection: number = 0,
167 ): Cursor {
168 // make MeasuredText on less than columns width, to account for cursor
169 return new Cursor(new MeasuredText(text, columns - 1), offset, selection)
170 }
171
172 getViewportStartLine(maxVisibleLines?: number): number {
173 if (maxVisibleLines === undefined || maxVisibleLines <= 0) return 0

Callers 7

PromptInputFunction · 0.80
modifyTextMethod · 0.80
replayLastChangeFunction · 0.80
handleVimInputFunction · 0.80
handleKeyDownFunction · 0.80
useTextInputFunction · 0.80
handleYankPopFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected