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

Method constructor

src/utils/Cursor.ts:153–160  ·  view source on GitHub ↗
(
    readonly measuredText: MeasuredText,
    offset: number = 0,
    readonly selection: number = 0,
  )

Source from the content-addressed store, hash-verified

151export class Cursor {
152 readonly offset: number
153 constructor(
154 readonly measuredText: MeasuredText,
155 offset: number = 0,
156 readonly selection: number = 0,
157 ) {
158 // it's ok for the cursor to be 1 char beyond the end of the string
159 this.offset = Math.max(0, Math.min(this.text.length, offset))
160 }
161
162 static fromText(
163 text: string,

Callers

nothing calls this directly

Calls 1

maxMethod · 0.80

Tested by

no test coverage detected