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

Method startOfLastLine

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

Source from the content-addressed store, hash-verified

1007 }
1008
1009 startOfLastLine(): Cursor {
1010 // Go to the beginning of the last line
1011 const lastNewlineIndex = this.text.lastIndexOf('\n')
1012
1013 if (lastNewlineIndex === -1) {
1014 // If there are no newlines, the text is a single line
1015 return this.startOfLine()
1016 }
1017
1018 // Position after the last newline character
1019 return new Cursor(this.measuredText, lastNewlineIndex + 1, 0)
1020 }
1021
1022 goToLine(lineNumber: number): Cursor {
1023 // 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