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

Method getViewportCharOffset

src/utils/Cursor.ts:186–191  ·  view source on GitHub ↗
(maxVisibleLines?: number)

Source from the content-addressed store, hash-verified

184 }
185
186 getViewportCharOffset(maxVisibleLines?: number): number {
187 const startLine = this.getViewportStartLine(maxVisibleLines)
188 if (startLine === 0) return 0
189 const wrappedLines = this.measuredText.getWrappedLines()
190 return wrappedLines[startLine]?.startOffset ?? 0
191 }
192
193 getViewportCharEnd(maxVisibleLines?: number): number {
194 const startLine = this.getViewportStartLine(maxVisibleLines)

Callers 1

useTextInputFunction · 0.80

Calls 2

getViewportStartLineMethod · 0.95
getWrappedLinesMethod · 0.80

Tested by

no test coverage detected