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

Function getLineStartOffset

src/vim/operators.ts:425–427  ·  view source on GitHub ↗

* Calculate the offset of a line's start position.

(lines: string[], lineIndex: number)

Source from the content-addressed store, hash-verified

423 * Calculate the offset of a line's start position.
424 */
425function getLineStartOffset(lines: string[], lineIndex: number): number {
426 return lines.slice(0, lineIndex).join('\n').length + (lineIndex > 0 ? 1 : 0)
427}
428
429function getOperatorRange(
430 cursor: Cursor,

Callers 4

executeJoinFunction · 0.85
executePasteFunction · 0.85
executeIndentFunction · 0.85
executeOpenLineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected