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
9 changes: 9 additions & 0 deletions src/lib/formatters/text-table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,15 @@ export class StreamingTable {
minWidths,
shrinkable,
});

// Expand last column to fill remaining terminal width — hint rows
// underestimate the true content width, so absorb the slack.
const totalFitted = this.columnWidths.reduce((s, w) => s + w, 0);
const lastIdx = this.columnWidths.length - 1;
if (totalFitted < maxContentWidth && lastIdx >= 0) {
this.columnWidths[lastIdx] =
(this.columnWidths[lastIdx] ?? 0) + (maxContentWidth - totalFitted);
}
}

/**
Expand Down