fix(tui): avoid overlay scrollback inflation on widen
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
|
||||
- Fixed markdown H1 headings ending with inline code from leaking underline styling into trailing line padding
|
||||
- Fixed slash-command argument autocomplete to await async `getArgumentCompletions()` results and ignore invalid return values, preventing crashes when extension commands provide asynchronous completions ([#2719](https://github.com/badlogic/pi-mono/issues/2719))
|
||||
- Fixed non-capturing overlay padding from inflating scrollback and corrupting the viewport on terminal widen ([#2758](https://github.com/badlogic/pi-mono/pull/2758) by [@dotBeeps](https://github.com/dotBeeps))
|
||||
|
||||
## [0.64.0] - 2026-03-29
|
||||
|
||||
|
||||
@@ -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