fix search width

This commit is contained in:
Isaac Johnson 2026-06-01 18:45:27 -05:00
parent f6a1572e92
commit eb8e3f8d79
1 changed files with 3 additions and 1 deletions

View File

@ -1055,7 +1055,9 @@ export class TuiEngine {
const sortLabel = chalk.bold(`${this.state.sortField} (${this.state.sortOrder.toUpperCase()})`); const sortLabel = chalk.bold(`${this.state.sortField} (${this.state.sortOrder.toUpperCase()})`);
const filtersText = ` Search: ${searchLabel} ─ State: ${stateFilterLabel} ─ Type: ${typeFilterLabel} ─ Sort: ${sortLabel}`; const filtersText = ` Search: ${searchLabel} ─ State: ${stateFilterLabel} ─ Type: ${typeFilterLabel} ─ Sort: ${sortLabel}`;
console.log(borderCh + filtersText.padEnd(cols - 2) + borderCh); const filtersPlainLen = stripAnsi(filtersText).length;
const padding = Math.max(0, cols - 2 - filtersPlainLen);
console.log(borderCh + filtersText + ' '.repeat(padding) + borderCh);
console.log(chalk.bold.hex('#4A90E2')('└' + '─'.repeat(cols - 2) + '┘')); console.log(chalk.bold.hex('#4A90E2')('└' + '─'.repeat(cols - 2) + '┘'));
// Keyboard controls help line // Keyboard controls help line