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

Method getViewportCharEnd

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

Source from the content-addressed store, hash-verified

191 }
192
193 getViewportCharEnd(maxVisibleLines?: number): number {
194 const startLine = this.getViewportStartLine(maxVisibleLines)
195 const allLines = this.measuredText.getWrappedLines()
196 if (maxVisibleLines === undefined || maxVisibleLines <= 0)
197 return this.text.length
198 const endLine = Math.min(allLines.length, startLine + maxVisibleLines)
199 if (endLine >= allLines.length) return this.text.length
200 return allLines[endLine]?.startOffset ?? this.text.length
201 }
202
203 render(
204 cursorChar: string,

Callers 1

useTextInputFunction · 0.80

Calls 2

getViewportStartLineMethod · 0.95
getWrappedLinesMethod · 0.80

Tested by

no test coverage detected