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

Method getViewportCharOffset

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

Source from the content-addressed store, hash-verified

159 }
160
161 getViewportCharOffset(maxVisibleLines?: number): number {
162 const startLine = this.getViewportStartLine(maxVisibleLines)
163 if (startLine === 0) return 0
164 const wrappedLines = this.measuredText.getWrappedLines()
165 return wrappedLines[startLine]?.startOffset ?? 0
166 }
167
168 getViewportCharEnd(maxVisibleLines?: number): number {
169 const startLine = this.getViewportStartLine(maxVisibleLines)

Callers 1

useTextInputFunction · 0.80

Calls 2

getViewportStartLineMethod · 0.95
getWrappedLinesMethod · 0.80

Tested by

no test coverage detected