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

Method startOfLine

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

Source from the content-addressed store, hash-verified

399 }
400
401 startOfLine(): Cursor {
402 const { line, column } = this.getPosition()
403
404 // If already at start of line and not at first line, move to previous line
405 if (column === 0 && line > 0) {
406 return new Cursor(
407 this.measuredText,
408 this.getOffset({
409 line: line - 1,
410 column: 0,
411 }),
412 0,
413 )
414 }
415
416 return this.startOfCurrentLine()
417 }
418
419 firstNonBlankInLine(): Cursor {
420 const { line } = this.getPosition()

Callers 4

deleteToLineStartMethod · 0.95
startOfLastLineMethod · 0.95
useTextInputFunction · 0.80
mapKeyFunction · 0.80

Calls 3

getPositionMethod · 0.95
getOffsetMethod · 0.95
startOfCurrentLineMethod · 0.95

Tested by

no test coverage detected