Fix layout line wrapping and scrolling on smaller terminals

This commit is contained in:
Isaac Johnson 2026-05-31 21:46:36 -05:00
parent 524ad77ea6
commit 478c628160
1 changed files with 3 additions and 3 deletions

View File

@ -855,7 +855,7 @@ export class TuiEngine {
let spacesCount = cols - leftLen - rightLen;
if (spacesCount < 1) spacesCount = 1;
console.log(leftHeader + ' '.repeat(spacesCount) + rightHeader);
console.log(leftHeader + ' '.repeat(spacesCount - 1) + rightHeader);
console.log(chalk.bold.hex('#4A90E2')('┌' + '─'.repeat(cols - 2) + '┐'));
// Column widths
@ -884,8 +884,8 @@ export class TuiEngine {
);
console.log(chalk.bold.hex('#4A90E2')('├' + '─'.repeat(cols - 2) + '┤'));
// Table Content Height available (rows - 9 ensures total printed lines is rows - 1, preventing terminal scrolling)
const tableHeight = rows - 9;
// Table Content Height available (rows - 10 ensures total printed lines is rows - 2, preventing terminal scrolling)
const tableHeight = rows - 10;
if (this.state.issues.length === 0) {
const msg = this.state.loading ? 'Fetching issues from server...' : (this.state.error ? `Error: ${this.state.error}` : 'No issues found.');