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

Method firstNonBlankInLine

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

Source from the content-addressed store, hash-verified

442 }
443
444 firstNonBlankInLine(): Cursor {
445 const { line } = this.getPosition()
446 const lineText = this.measuredText.getWrappedText()[line] || ''
447
448 const match = lineText.match(/^\s*\S/)
449 const column = match?.index ? match.index + match[0].length - 1 : 0
450 const offset = this.getOffset({ line, column })
451
452 return new Cursor(this.measuredText, offset, 0)
453 }
454
455 endOfLine(): Cursor {
456 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