MCPcopy Create free account
hub / github.com/coder/ghostty-web / getViewportY

Method getViewportY

lib/selection-manager.ts:70–76  ·  view source on GitHub ↗

* Get current viewport Y position (how many lines scrolled into history)

()

Source from the content-addressed store, hash-verified

68 * Get current viewport Y position (how many lines scrolled into history)
69 */
70 private getViewportY(): number {
71 const rawViewportY =
72 typeof (this.terminal as any).getViewportY === 'function'
73 ? (this.terminal as any).getViewportY()
74 : (this.terminal as any).viewportY || 0;
75 return Math.max(0, Math.floor(rawViewportY));
76 }
77
78 /**
79 * Convert viewport row to absolute buffer row

Callers 5

viewportRowToAbsoluteMethod · 0.95
absoluteRowToViewportMethod · 0.95
selectAllMethod · 0.95
selectMethod · 0.95
selectLinesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected