From 5d0c8cc20c8cac12b46845f3574136bf7bfdc0eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Sun, 15 Feb 2026 00:55:33 +0100 Subject: [PATCH] fix: apply black background to banking TUI padding areas Padding spaces (end-of-line and blank filler lines) were unstyled, causing the terminal's default background to bleed through. Co-Authored-By: Claude Opus 4.6 --- internal/shell/banking/style.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/internal/shell/banking/style.go b/internal/shell/banking/style.go index 7847899..3179b74 100644 --- a/internal/shell/banking/style.go +++ b/internal/shell/banking/style.go @@ -101,13 +101,14 @@ func formatCurrency(cents int64) string { } // padLine pads a single line (which may contain ANSI codes) to termWidth -// using its visual width. +// using its visual width. Padding uses a black background so the terminal's +// default background doesn't bleed through. func padLine(line string) string { w := lipgloss.Width(line) if w >= termWidth { return line } - return line + strings.Repeat(" ", termWidth-w) + return line + baseStyle.Render(strings.Repeat(" ", termWidth-w)) } // padLines pads every line in a multi-line string to termWidth so that @@ -147,7 +148,7 @@ func screenFrame(bankName, terminalID, region, content string, height int) strin // strings.Count gives newlines; add 1 for the line after the last \n. contentLines := strings.Count(content, "\n") + 1 used := headerLines + contentLines + footerLines - blankLine := strings.Repeat(" ", termWidth) + blankLine := baseStyle.Render(strings.Repeat(" ", termWidth)) for i := used; i < height; i++ { b.WriteString(blankLine) b.WriteString("\n")