MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / modifyText

Method modifyText

source code/utils/Cursor.ts:847–861  ·  view source on GitHub ↗
(end: Cursor, insertString: string = '')

Source from the content-addressed store, hash-verified

845 }
846
847 modifyText(end: Cursor, insertString: string = ''): Cursor {
848 const startOffset = this.offset
849 const endOffset = end.offset
850
851 const newText =
852 this.text.slice(0, startOffset) +
853 insertString +
854 this.text.slice(endOffset)
855
856 return Cursor.fromText(
857 newText,
858 this.columns,
859 startOffset + insertString.normalize('NFC').length,
860 )
861 }
862
863 insert(insertString: string): Cursor {
864 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