Keep fitted terminal bottom row visible

Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
Jinwoo-H
2026-04-30 18:03:56 -04:00
co-authored by Orca
parent 686d9f876a
commit be89fc3518
+4 -1
View File
@@ -309,7 +309,10 @@ const XTERM_HTML = `<!DOCTYPE html>
var vpWidth = window.innerWidth;
var vpHeight = window.innerHeight;
var cols = Math.floor(vpWidth / cellWidth);
var rows = Math.floor(vpHeight / cellHeight);
// Why: Android WebView can report a viewport that is a little taller than
// the visibly unobscured terminal area next to the native input chrome.
// Reserve one row so max scroll leaves the final line fully visible.
var rows = Math.max(8, Math.floor(vpHeight / cellHeight) - 1);
notify({ type: 'measure-result', cols: cols, rows: rows });
}