From eb8e3f8d79c56f29c41469260f6ba7c4ecdd1c24 Mon Sep 17 00:00:00 2001 From: Isaac Johnson Date: Mon, 1 Jun 2026 18:45:27 -0500 Subject: [PATCH] fix search width --- src/tui.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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