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

Method startOfLine

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

Source from the content-addressed store, hash-verified

424 }
425
426 startOfLine(): Cursor {
427 const { line, column } = this.getPosition()
428
429 // If already at start of line and not at first line, move to previous line
430 if (column === 0 && line > 0) {
431 return new Cursor(
432 this.measuredText,
433 this.getOffset({
434 line: line - 1,
435 column: 0,
436 }),
437 0,
438 )
439 }
440
441 return this.startOfCurrentLine()
442 }
443
444 firstNonBlankInLine(): Cursor {
445 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