diff --git a/src/tui.ts b/src/tui.ts index faa3556..46bc44d 100644 --- a/src/tui.ts +++ b/src/tui.ts @@ -1055,7 +1055,9 @@ export class TuiEngine { const sortLabel = chalk.bold(`${this.state.sortField} (${this.state.sortOrder.toUpperCase()})`); 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) + '┘')); // Keyboard controls help line