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

Method startOfLastLine

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

Source from the content-addressed store, hash-verified

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