Skip to content

Commit

Permalink
Refactored option rendering in field_select.go to improve distinction…
Browse files Browse the repository at this point in the history
… between selected and unselected options.

ref: charmbracelet/gum#614
  • Loading branch information
csandeep committed Jul 11, 2024
1 parent 80fcf53 commit ef94ead
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion field_select.go
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ func (s *Select[T]) optionsView() string {
if s.selected == i {
sb.WriteString(c + styles.SelectedOption.Render(option.Key))
} else {
sb.WriteString(strings.Repeat(" ", lipgloss.Width(c)) + styles.Option.Render(option.Key))
sb.WriteString(strings.Repeat(" ", lipgloss.Width(c)) + styles.UnselectedOption.Render(option.Key))
}
if i < len(s.options.val)-1 {
sb.WriteString("\n")
Expand Down

0 comments on commit ef94ead

Please sign in to comment.