Skip to content

fix: remove extra space in error message causing misalignment with help text#756

Open
majiayu000 wants to merge 1 commit into
charmbracelet:mainfrom
majiayu000:fix/issue-723-error-message-alignment
Open

fix: remove extra space in error message causing misalignment with help text#756
majiayu000 wants to merge 1 commit into
charmbracelet:mainfrom
majiayu000:fix/issue-723-error-message-alignment

Conversation

@majiayu000
Copy link
Copy Markdown

Fixes #723

ErrorMessage in ThemeBase() at theme.go:114 had SetString(" *") with a leading space, while HelpMessage uses SetString("*") without one. This caused the error footer to render 1 character to the right of the help text.

Changed SetString(" *") to SetString("*") so both messages start at the same column. ErrorIndicator on line 113 keeps its leading space since that's the separator between the field title and the asterisk.

The Blurred theme copies from Focused (line 128), and all other themes only override the foreground color on ErrorMessage, so this single change fixes it everywhere.

…lp text

The ErrorMessage SetString had a leading space (" *") that caused
the validation error to be offset from the help text in the group
footer. ErrorIndicator keeps its space as an intentional separator.

Fixes charmbracelet#723

Signed-off-by: majiayu000 <1835304752@qq.com>
@majiayu000 majiayu000 marked this pull request as ready for review March 28, 2026 10:25
@majiayu000 majiayu000 requested a review from a team as a code owner March 28, 2026 10:25
@majiayu000 majiayu000 requested review from aymanbagabas and meowgorithm and removed request for a team March 28, 2026 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Misalignment between help and validation error message

2 participants