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

Method deleteToLineEnd

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

Source from the content-addressed store, hash-verified

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