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

Method startOfLastLine

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

Source from the content-addressed store, hash-verified

982 }
983
984 startOfLastLine(): Cursor {
985 // Go to the beginning of the last line
986 const lastNewlineIndex = this.text.lastIndexOf('\n')
987
988 if (lastNewlineIndex === -1) {
989 // If there are no newlines, the text is a single line
990 return this.startOfLine()
991 }
992
993 // Position after the last newline character
994 return new Cursor(this.measuredText, lastNewlineIndex + 1, 0)
995 }
996
997 goToLine(lineNumber: number): Cursor {
998 // Go to the beginning of the specified logical line (1-indexed, like vim)

Callers 3

executeOperatorGFunction · 0.80
applySingleMotionFunction · 0.80
handleNormalInputFunction · 0.80

Calls 1

startOfLineMethod · 0.95

Tested by

no test coverage detected