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

Method deleteToLineEnd

source code/utils/Cursor.ts:898–907  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

896 }
897
898 deleteToLineEnd(): { cursor: Cursor; killed: string } {
899 // If cursor is on a newline character, delete just that character
900 if (this.text[this.offset] === '\n') {
901 return { cursor: this.modifyText(this.right()), killed: '\n' }
902 }
903
904 const endCursor = this.endOfLine()
905 const killed = this.text.slice(this.offset, endCursor.offset)
906 return { cursor: this.modifyText(endCursor), killed }
907 }
908
909 deleteToLogicalLineEnd(): Cursor {
910 // If cursor is on a newline character, delete just that character

Callers 2

handleKeyDownFunction · 0.80
killToLineEndFunction · 0.80

Calls 3

modifyTextMethod · 0.95
rightMethod · 0.95
endOfLineMethod · 0.95

Tested by

no test coverage detected