mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 21:03:19 +00:00
Fix session picker hint overflow (closes #764)
This commit is contained in:
parent
c5cf74e032
commit
588399594c
1 changed files with 3 additions and 1 deletions
|
|
@ -95,7 +95,9 @@ class SessionSelectorHeader implements Component {
|
|||
const availableLeft = Math.max(0, width - visibleWidth(rightText) - 1);
|
||||
const left = truncateToWidth(leftText, availableLeft, "");
|
||||
const spacing = Math.max(0, width - visibleWidth(left) - visibleWidth(rightText));
|
||||
const hint = theme.fg("muted", 'Tab: scope · Ctrl+R: sort · re:<pattern> for regex · "phrase" for exact phrase');
|
||||
const hintText = 'Tab: scope · Ctrl+R: sort · re:<pattern> for regex · "phrase" for exact phrase';
|
||||
const truncatedHint = truncateToWidth(hintText, width, "…");
|
||||
const hint = theme.fg("muted", truncatedHint);
|
||||
return [`${left}${" ".repeat(spacing)}${rightText}`, hint];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue