MCPcopy
hub / github.com/codeaashu/claude-code / getGraphemeBoundaries

Method getGraphemeBoundaries

src/utils/Cursor.ts:1150–1160  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1148 }
1149
1150 private getGraphemeBoundaries(): number[] {
1151 if (!this.graphemeBoundaries) {
1152 this.graphemeBoundaries = []
1153 for (const { index } of getGraphemeSegmenter().segment(this.text)) {
1154 this.graphemeBoundaries.push(index)
1155 }
1156 // Add the end of text as a boundary
1157 this.graphemeBoundaries.push(this.text.length)
1158 }
1159 return this.graphemeBoundaries
1160 }
1161
1162 private wordBoundariesCache?: Array<{
1163 start: number

Callers 4

offsetAtDisplayWidthMethod · 0.95
nextOffsetMethod · 0.95
prevOffsetMethod · 0.95

Calls 3

getGraphemeSegmenterFunction · 0.85
segmentMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected