diff options
| author | Paul Buetow <paul@buetow.org> | 2026-04-07 08:57:06 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-04-07 09:24:18 +0300 |
| commit | 0aee798f25d09203742361c173e9dcd1a300d700 (patch) | |
| tree | 5aba404cc5bbaf614adbbf18299e42c5516d2a0d | |
| parent | 0689fd71cbb2890aacb7a24c6ec8baa4956ad8eb (diff) | |
ui: fix black spot between label and value in ultra meta line
The space between "project:" and its value in ultraKeyValue was a plain
unstyled " " string. After the label span's ANSI reset the terminal
reverted to black background for that single space before the value
span's bg kicked in.
Fix: apply bg to the separator space the same way ultraFieldSep does for
the " | " between fields.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
| -rw-r--r-- | internal/ui/ultra.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/internal/ui/ultra.go b/internal/ui/ultra.go index 9213af1..9fccc0c 100644 --- a/internal/ui/ultra.go +++ b/internal/ui/ultra.go @@ -809,7 +809,13 @@ func ultraFieldSep(bg string) string { func (m *Model) ultraKeyValue(re *regexp.Regexp, label, value, bg string) string { labelStyle := lipgloss.NewStyle().Bold(true).Foreground(lipgloss.Color(m.theme.HeaderFG)) valueStyle := lipgloss.NewStyle().Foreground(lipgloss.Color("252")) - return m.ultraStyledText(re, labelStyle, label+":", bg) + " " + m.ultraStyledText(re, valueStyle, value, bg) + // The space between label and value must also carry bg; a plain " " would + // expose the terminal default (black) between the two styled spans. + space := lipgloss.NewStyle().Background(lipgloss.Color(bg)).Render(" ") + if bg == "" { + space = " " + } + return m.ultraStyledText(re, labelStyle, label+":", bg) + space + m.ultraStyledText(re, valueStyle, value, bg) } func ultraCardStyle(theme Theme, width int, selected, blink bool) lipgloss.Style { |
