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

Method startOfLine

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

Source from the content-addressed store, hash-verified

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