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

Method length

lib/buffer.ts:150–162  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

148 }
149
150 get length(): number {
151 const wasmTerm = this.getWasmTerm();
152 if (!wasmTerm) return 0;
153
154 if (this.bufferType === 'alternate') {
155 // Alternate buffer has no scrollback, just visible rows
156 return wasmTerm.rows;
157 } else {
158 // Normal buffer: scrollback + visible rows
159 const scrollback = wasmTerm.getScrollbackLength();
160 return scrollback + wasmTerm.rows;
161 }
162 }
163
164 getLine(y: number): IBufferLine | undefined {
165 const wasmTerm = this.getWasmTerm();

Callers

nothing calls this directly

Calls 2

getWasmTermMethod · 0.95
getScrollbackLengthMethod · 0.65

Tested by

no test coverage detected