Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Long descriptions hide the user's input #519

Open
2ynn opened this issue Jan 29, 2025 · 0 comments
Open

Long descriptions hide the user's input #519

2ynn opened this issue Jan 29, 2025 · 0 comments

Comments

@2ynn
Copy link

2ynn commented Jan 29, 2025

When an input description is too long (i.e. if it gets rendered on more than 2 lines) the user input gets lost.

package main

import (
	"github.com/charmbracelet/huh"
)

func main() {
	form := huh.NewForm(
		huh.NewGroup(
			huh.NewInput().
				Title("FieldName").
				Placeholder("Value").
				Description("This is a complicated field that requires a long winded description to fully grasp the intricacies of its ins and outs in each particular application. Ideally it should be possible to read the entirety of this description without the user's input disappearing."),
		),
	)

	form.Run()
}

Image
Image

(reproduced on alacritty 0.15.0-dev and rxvt-unicode (urxvt) v9.30)

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

No branches or pull requests

1 participant