Fix layout rounding. (#18667)

This commit is contained in:
Christian Gunderman
2026-02-10 04:53:49 +00:00
committed by GitHub
parent 92a5f725a1
commit bd2744031f
2 changed files with 4 additions and 6 deletions
+3 -5
View File
@@ -1183,11 +1183,9 @@ Logging in with Google... Restarting Gemini CLI to continue.
useLayoutEffect(() => {
if (mainControlsRef.current) {
const fullFooterMeasurement = measureElement(mainControlsRef.current);
if (
fullFooterMeasurement.height > 0 &&
fullFooterMeasurement.height !== controlsHeight
) {
setControlsHeight(fullFooterMeasurement.height);
const roundedHeight = Math.round(fullFooterMeasurement.height);
if (roundedHeight > 0 && roundedHeight !== controlsHeight) {
setControlsHeight(roundedHeight);
}
}
}, [buffer, terminalWidth, terminalHeight, controlsHeight]);