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

Method firstNonBlankInLine

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

Source from the content-addressed store, hash-verified

417 }
418
419 firstNonBlankInLine(): Cursor {
420 const { line } = this.getPosition()
421 const lineText = this.measuredText.getWrappedText()[line] || ''
422
423 const match = lineText.match(/^\s*\S/)
424 const column = match?.index ? match.index + match[0].length - 1 : 0
425 const offset = this.getOffset({ line, column })
426
427 return new Cursor(this.measuredText, offset, 0)
428 }
429
430 endOfLine(): Cursor {
431 const { line } = this.getPosition()

Callers

nothing calls this directly

Calls 3

getPositionMethod · 0.95
getOffsetMethod · 0.95
getWrappedTextMethod · 0.80

Tested by

no test coverage detected