Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions terminal/src/main/java/org/jline/utils/Status.java
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,13 @@ public void resize(Size size) {
clearStart = Math.min(clearStart, oldScrollRegion + 1);
}
if (effectiveLines > 0) {
// When the terminal height shrinks, some terminal emulators
// preserve the old bottom status line just above the new
// status area. Clear one status-height band above the
// status area so the next redraw does not leave duplicates.
if (newRows < oldRows) {
clearStart = Math.min(clearStart, Math.max(0, scrollRegion + 1 - effectiveLines));
}
// Account for wrapped status lines when width decreased
if (display.columns < oldColumns) {
int wrappedPerLine = (oldColumns + display.columns - 1) / display.columns;
Expand Down