fix search width
This commit is contained in:
parent
f6a1572e92
commit
eb8e3f8d79
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue