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

Use the correct given style for the InteractiveSelectPrinter instead of the default theme. #426

Merged
merged 2 commits into from Dec 24, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions interactive_select_printer.go
Expand Up @@ -245,7 +245,7 @@ func (p *InteractiveSelectPrinter) Show(text ...string) (string, error) {

func (p *InteractiveSelectPrinter) renderSelectMenu() string {
var content string
content += Sprintf("%s %s: %s\n", p.text, ThemeDefault.SecondaryStyle.Sprint("[type to search]"), p.fuzzySearchString)
content += Sprintf("%s %s: %s\n", p.text, p.SelectorStyle.Sprint("[type to search]"), p.fuzzySearchString)

// find options that match fuzzy search string
rankedResults := fuzzy.RankFindFold(p.fuzzySearchString, p.Options)
Expand Down Expand Up @@ -275,9 +275,9 @@ func (p *InteractiveSelectPrinter) renderSelectMenu() string {
continue
}
if i == p.selectedOption {
content += Sprintf("%s %s\n", p.renderSelector(), option)
content += Sprintf("%s %s\n", p.renderSelector(), p.OptionStyle.Sprint(option))
} else {
content += Sprintf(" %s\n", option)
content += Sprintf(" %s\n", p.OptionStyle.Sprint(option))
}
}

Expand Down