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

Method modifyText

src/utils/Cursor.ts:820–834  ·  view source on GitHub ↗
(end: Cursor, insertString: string = '')

Source from the content-addressed store, hash-verified

818 }
819
820 modifyText(end: Cursor, insertString: string = ''): Cursor {
821 const startOffset = this.offset
822 const endOffset = end.offset
823
824 const newText =
825 this.text.slice(0, startOffset) +
826 insertString +
827 this.text.slice(endOffset)
828
829 return Cursor.fromText(
830 newText,
831 this.columns,
832 startOffset + insertString.normalize('NFC').length,
833 )
834 }
835
836 insert(insertString: string): Cursor {
837 const newCursor = this.modifyText(this, insertString)

Callers 9

insertMethod · 0.95
delMethod · 0.95
deleteToLineEndMethod · 0.95
deleteWordBeforeMethod · 0.95
deleteTokenBeforeMethod · 0.95
deleteWordAfterMethod · 0.95
backspaceMethod · 0.80
deleteToLineStartMethod · 0.80

Calls 1

fromTextMethod · 0.80

Tested by

no test coverage detected