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

Method deleteToLineEnd

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

Source from the content-addressed store, hash-verified

869 }
870
871 deleteToLineEnd(): { cursor: Cursor; killed: string } {
872 // If cursor is on a newline character, delete just that character
873 if (this.text[this.offset] === '\n') {
874 return { cursor: this.modifyText(this.right()), killed: '\n' }
875 }
876
877 const endCursor = this.endOfLine()
878 const killed = this.text.slice(this.offset, endCursor.offset)
879 return { cursor: this.modifyText(endCursor), killed }
880 }
881
882 deleteToLogicalLineEnd(): Cursor {
883 // 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