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

Method fromText

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

Source from the content-addressed store, hash-verified

135 }
136
137 static fromText(
138 text: string,
139 columns: number,
140 offset: number = 0,
141 selection: number = 0,
142 ): Cursor {
143 // make MeasuredText on less than columns width, to account for cursor
144 return new Cursor(new MeasuredText(text, columns - 1), offset, selection)
145 }
146
147 getViewportStartLine(maxVisibleLines?: number): number {
148 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