fix(tui): avoid overlay scrollback inflation on widen
This commit is contained in:
@@ -722,9 +722,10 @@ export class TUI extends Container {
|
||||
minLinesNeeded = Math.max(minLinesNeeded, row + overlayLines.length);
|
||||
}
|
||||
|
||||
// Ensure result covers the terminal working area to keep overlay positioning stable across resizes.
|
||||
// maxLinesRendered can exceed current content length after a shrink; pad to keep viewportStart consistent.
|
||||
const workingHeight = Math.max(this.maxLinesRendered, minLinesNeeded);
|
||||
// Pad to at least terminal height so overlays have screen-relative positions.
|
||||
// Excludes maxLinesRendered: the historical high-water mark caused self-reinforcing
|
||||
// inflation that pushed content into scrollback on terminal widen.
|
||||
const workingHeight = Math.max(result.length, termHeight, minLinesNeeded);
|
||||
|
||||
// Extend result with empty lines if content is too short for overlay placement or working area
|
||||
while (result.length < workingHeight) {
|
||||
|
||||
Reference in New Issue
Block a user