mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-08-09 00:16:57 -07:00
2c4fe9f245
- Prevents memory access out of bounds crash in yoga-wasm by avoiding synchronous unmounts of history items - Eliminates duplicated footer artifacts when exiting alternate buffer by ensuring Ink has time to issue erasure codes before swapping terminal buffers - Fully restores normal buffer scrollback without clipping or duplicating history - Resolves startup layout rendering bug when alternate buffer is set in config by manually handling terminal transitions instead of letting Ink's alternateBuffer renderer take over
16 lines
287 B
TypeScript
16 lines
287 B
TypeScript
/**
|
|
* @license
|
|
* Copyright 2025 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
export const calculateMainAreaWidth = (
|
|
terminalWidth: number,
|
|
isAlternateBuffer: boolean,
|
|
): number => {
|
|
if (isAlternateBuffer) {
|
|
return terminalWidth - 1;
|
|
}
|
|
return terminalWidth;
|
|
};
|