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

Method getViewportCharEnd

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

Source from the content-addressed store, hash-verified

166 }
167
168 getViewportCharEnd(maxVisibleLines?: number): number {
169 const startLine = this.getViewportStartLine(maxVisibleLines)
170 const allLines = this.measuredText.getWrappedLines()
171 if (maxVisibleLines === undefined || maxVisibleLines <= 0)
172 return this.text.length
173 const endLine = Math.min(allLines.length, startLine + maxVisibleLines)
174 if (endLine >= allLines.length) return this.text.length
175 return allLines[endLine]?.startOffset ?? this.text.length
176 }
177
178 render(
179 cursorChar: string,

Callers 1

useTextInputFunction · 0.80

Calls 2

getViewportStartLineMethod · 0.95
getWrappedLinesMethod · 0.80

Tested by

no test coverage detected